You should be error checking every call to mysql which could fail. mysql_select_db() is the same as calling mysql_query('use dbname').
Code:if (! mysql_select_db($db)) { echo(mysql_error()); die; } if (! ($result = mysql_query($query)) { echo(mysql_error()); die; }




Reply With Quote