This afternoon I posted my PHP database library on Google code. It’s designed to be very lightweight, and uses the PHP4 MySQL functions as well as the PostgreSQL functions, but is built for PHP5. It uses sprintf formatting, and works must like the Python database cursor’s, to help alleviate injection concerns while you are writing your SQL queries. It also uses lazy connections, so you don’t need to worry about connecting to your database when you won’t be executing any statements.
1 2 3 4 5 6 7 8 9 10 11
If someone wishes to force me to learn the
mysqli_ functions, feel free to send me the changes to the library and I will gladly implement them. Also, I’m aware that PDO and other extensions exist, but a database library isn’t complicated. When deploying code on many servers, it’s much easier to have things present in the code base, than to require on external dependencies.
Hope this is useful!