01-21-2008, 10:14 AM
|
#5 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
I remember writing an article ages ago about this, ahh the good old days.
looks good to me m8, although you dont need to tell php to get a reference:
PHP Code:
self::$instance =& mysql_driver::getInstance();
as php5 passes objects around by ref automatically and infact (i believe) your code may produce a E_STRICT error (or is that just for the 'new' keyword? not sure on that), so
PHP Code:
self::$instance = mysql_driver::getInstance();
would achive the same ends.
apart from that all is good.
i also like to create my own DAL, gives me more control and is less bulky and cumbersome as others.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|