Description: Returns the error message text from the previous MySQL operation, or the empty string if no error occurred.
Example:
if ($result = mysql_query ("select * from bad_table")) { # query worked okay, keep going } else { echo "A database error occurred!<BR> "; echo mysql_error() ." (error no. ". mysql_errno() .")<BR> "; exit; }
See also: mysql_errno()
3.137.152.87