]> granicus.if.org Git - php/commitdiff
Given that we have a DB connection by the time we get here,
authorRasmus Lerdorf <rasmus@php.net>
Mon, 3 Aug 2009 04:57:31 +0000 (04:57 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Mon, 3 Aug 2009 04:57:31 +0000 (04:57 +0000)
mysql_affected_rows() cannot return false.

ext/mysql/tests/mysql_affected_rows.phpt

index 3001bf14ce8af92db5b0c6986edc460c282a1180..42632bf8d7f65ec022f92cf499a41bf5aa190f07 100644 (file)
@@ -12,8 +12,8 @@ include_once("connect.inc");
 $tmp    = NULL;
 $link   = NULL;
 
-if (false !== ($tmp = @mysql_affected_rows()))
-       printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+if (0 !== ($tmp = @mysql_affected_rows()))
+       printf("[001] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
 
 if (null !== ($tmp = @mysql_affected_rows($link)))
        printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);