Error codes from 'mysql_error()'
| From: | Dennis Gearon | Date: | Thu, 08 Mar 2001 23:16:41 +0000 |
| Subject: | Error codes from 'mysql_error()' | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43084@lists.php.net to get a copy of this message | ||
I do an insert using phpadmin, and i get back the error message (or
maybe it's a warning?) The insert is of a duplicate on a unique field. I
expected an error, but when I do mysql_error() or mysql_errno(), nothing
comes back(and I do it the next line in the script). the
'mysql_query($sql, $link)' function DOES insert when the value is
unique, DOES return false, but I'd like to inform the user what the
error was. PHP Admin can get the 'error' why can't I?
Please reply to me as well, OK? I'm trying to finish this script at work
today.
gearond@oit.edu