| PHP Database Integration With MySQL |
|
|
|
| The Article - php | |||||||||
| Written by Chetankumar Akarte | |||||||||
| Wednesday, 07 March 2007 | |||||||||
Page 6 of 7 Error Handling:When performing any operation on MySQL using PHP, if any error occurs, our script will not work properly. A single error can cause hundreds of lines of code to not work properly. Here, PHP provides some special functions to print more informative error messages to the browser to aid debugging. MySQL gives an error message and an error number when an operation fails. PHP provides the function mysql_error() to print error message and mysql_errno() to print error number to browser, which becomes very useful while debugging the code. You can easily get output for mysql_error() if any error occurs while executing code given in this article. You can just replace mysql_error() with mysql_errno() to get an error number in place of error message.
|
|||||||||
| Last Updated ( Tuesday, 13 March 2007 ) | |||||||||