News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPEasy.co.uk:
Object Orientation Basics part 4 - Implementing CRUD methods
August 07, 2012 @ 12:23:36

PHPEasy.co.uk continues their series looking at some of the basics of Object-Oriented Programming (OOP) in PHP with part four showing how to implement CRUD methods (Create/Read/Update/Delete) on a database connection.

In the last tutorial in this beginners series we discussed using PDO to connect to a MySQL database. Following on from that tutorial we are going to improve the Guitar class we made by adding some basic CRUD methods so that our class can interact with our database using PDO.

He brings back the same class structure and shows how to take a "Guitar" object, create a connection via a "conn()" method and use the getters/setters to assign values for saving, selecting, deleting and updating the database's records.

0 comments voice your opinion now!
oop object oriented introduction pdo crud


blog comments powered by Disqus

Similar Posts

Adam Gotterer's Blog: Building an Object Collection Manager with the Standard PHP Library (SPL)

PHPMaster.com: Lesser-Known "Features" of PHP's OO Model

DZone.com: DevOps for Devs in 3 Steps (Presentation)

Nefarious Designs: Object-Oriented PHP Part 4: PHP5's Improved Features

PHPMaster.com: Baking Cookies in PHP


Community Events





Don't see your event here?
Let us know!


threedevsandamaybe refactor configure framework unittest install testing laravel interview developer language code release series list wordpress opinion community introduction podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework