Extending PDO

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ChrisBull
Forum Commoner
Posts: 42
Joined: Fri Aug 20, 2010 7:43 am

Extending PDO

Post by ChrisBull »

I am running a site that is using a design pattern (can't remember what its called but its the one where you have a registry file that is on all pages and can store objects). Anyway, I need to create an object for database operations and would like to use PDO.

So i need to create a class that extends the pdo class.

Can someone either point me in the direction of a tutorial, a class someone has already made or outline the structure so i can make my own? I can't currently find a completed one online or a tutorial to make one.

many Thanks
Chris
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Extending PDO

Post by Weirdan »

Code: Select all

class YourClass extends PDO {
  // ....
}
Post Reply