]> granicus.if.org Git - php/commitdiff
fix #35391 (pdo_mysql::exec does not return number of affected rows)
authorAntony Dovgal <tony2001@php.net>
Fri, 25 Nov 2005 12:54:18 +0000 (12:54 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 25 Nov 2005 12:54:18 +0000 (12:54 +0000)
ext/pdo_mysql/mysql_driver.c

index 6683e5bba65f62065e3e3e88e8c94c44e91bb9a1..35e12fd2e7e65df725112e2cc962369c3e5bfa59 100755 (executable)
@@ -235,7 +235,7 @@ static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM
                return -1;
        } else {
                my_ulonglong c = mysql_affected_rows(H->server);
-               if (c != (my_ulonglong) -1) {
+               if (c == (my_ulonglong) -1) {
                        pdo_mysql_error(dbh);
                        return (H->einfo.errcode ? -1 : 0);
                } else {