Review my DB class
View Single Post
01-14-2008, 10:23 PM
Join Date: Jan 2008
Sorry for the double post.
After finally taking the time to peruse your code Andres, I must say I like your method. Our style and implementation differ, but we think similarly. Good work on abstracting your database code away from the drudgery of repetition.
One thing I noticed is the difference in
functions. Why not have an abstract function in the parent class and override that per child class. Just one call to escape for the object, regardless of internal type. No need to have independently named escape functions.
And MySQLi isn't nearly present enough in modern servers. My server with MySQL 5.0.45 and PHP 5.2.5 doesn't have it, and it's no guarantee anyone else does too. Never assume, always prepare for the worst.
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
- Rich Cook
View Public Profile
Send a private message to RobertK
Find More Posts by RobertK