View Single Post
Old 08-24-2009, 09:43 AM   #6 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

for info - i ended up creating a singleton select pattern for db access. Using a static method check if an object has already been instantiated and if not then instantiate one.

I also extended the mysqli PHP delivered class to add a lot of extra functionality like class methods to start transactions of work, force rollbacks etc and also added a debug property so if its set to True i throw exceptions spilling out a lot of debug info and if False i throw a generic "having technical difficulties" exception.

Reason I mention is I am using the same approach as yourself and found extending the mysqli class incredibly useful.
captainmerton is offline  
Reply With Quote