The SQL Class
View Single Post
01-16-2009, 02:29 PM
Join Date: Sep 2007
Location: Sweden, Stockholm
Okey, after reading about their functions, I see why you thought it would sound silly or impractical. Indeed, it would be very impractical to have mysqli option in the mysql DB object. However, I've done a DB factory class, which would let you create a db object based off of what db you want, like:
$db = DB::getDatabase('mysql');
and it would then create a new DBmysql and return the instance.
It would then be easy to create other objects, such as DBmysqli, DBmysql_PDO, DBsqlite_PDO, etc.
But that's only if you guys want it. However, I think Orc will have to change the __construct in his class since it's checking if the class is an instance of DBmysql, and I don't know if someone else has done something using this class that would be affected by this change.
I would however be happy to change it, if you want.
And by "change it", I mean create the factory class.
View Public Profile
Send a private message to Tanax
Visit Tanax's homepage!
Find More Posts by Tanax