note 16517 deleted from function.mysql-affected-rows by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 17:22:26 +0000 |
| Subject: | note 16517 deleted from function.mysql-affected-rows by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20309@lists.php.net to get a copy of this message | ||
When checking for failures, I have found that you can not check the results of the funtion with an
if statement as follows:
if(!(mysql_affected_rows($link))){
print error
}
This function returns a -1 on failure not a false. Apparently -1 to php is not false. To get this to
work simply
redo the if statement like this:
if((mysql_affected_rows($link)) = -1){
print error
}