|
| |
Error message displaying after execution of a query |
We can display error message in case of an error generated by mysql query. This meaning full error message gives idea one the problem or bugs in the script. We can print the error message by using mysql function mysql_error(). This function returns the error message associated with most recently executed query. So it is a good idea to check for error before going to next query. We can even add the error number returned by mysql to this error message. This way we can generate a meaningful detail on the bugs on the script.
$querry = mysql_query("SELECT new_field FROM student");
echo "Error message = ".mysql_error();
We can collect the error message generated in an sql query and post it to an email address. Read more >>
| |
|
|
|