mysql_error() problem?
| From: | Tyler Longren | Date: | Wed, 06 Aug 2003 20:30:23 +0000 |
| Subject: | mysql_error() problem? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158547@lists.php.net to get a copy of this message | ||
Hi,
I'm running an UPDATE query on my table. After executing the query, I check
mysql_error() to see if there's any errors:
if (mysql_error() == "") {
// success
}
else {
// failure
}
mysql_error() is always empty even if the query didn't succeed. So it
always thinks it succeeds. I remember having this problem once quite a
while ago. I remember somebody telling me that it had something to do with
UPDATE. Is there a better way to check for errors?
Thanks,
Tyler