Can I represent the MySQL error codes symbolically? For example:
Code: Select all
$result = mysql_query(...)
if ($result == 1146) // Table not found, so I want to add one...I would like to replace the 1146 with something from an include file that is maintained by MySQL -- something like MySQL_ERROR_TABLE_NOT_FOUND.
Code: Select all
$result = mysql_query(...)
if ($result == MySQL_ERROR_TABLE_NOT_FOUND) // Table not found, so I want to add one...Are you aware of any way to do this? I've not found many who tests errors -- they pretty much all simply return them. And the one example I found used the integer value rather than a symbolic representation. Any thoughts?
Chris
Fill what's empty, empty what's full and scratch where it itches ...
Life is a journey, not a destination.