SQL PHP HTML ASP JavaScript articles and free scripts to download
SQL PHP MySQL Functions

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 >>


More on PHP MySQL functions
dealer pulsa28-05-2010
thanks for sharing, It's usefull for me
Failed to read auto-increment value from storage engine
Post Comment This is for short comments only. Use the forum for more discussions.
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
For Email Newsletters you can trust

HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer