Aaron Wolski wrote:

Here's some functions I use in my development which save on connect and
query calls for me.

aaron: i do more or less the same thing. allow me to criticize your functions in one very important respect: you do not check the return value of your calls! i would suggest that anyone doing mysql work ALWAYS check the return value. it will save you MUCH head scratching later on down the line. really.


function db_connect() {


function db_connect {
mysql_pconnect('localhost','username','password') or die(mysql_error());
mysql_select_db('database') or die(mysql_error());

and so forth.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to