summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-11-25 12:56:04 +0000
committerAntony Dovgal <tony2001@php.net>2005-11-25 12:56:04 +0000
commitdc0db7382cfe7f4855280fde2fc0e6f1f19ad6c8 (patch)
tree9b478604c21c385531cf5f8e589fe611786cb3cb /ext/pdo_mysql/mysql_driver.c
parent350aec954e39d5c4ac55fa8f259d0104761120c3 (diff)
downloadphp-git-dc0db7382cfe7f4855280fde2fc0e6f1f19ad6c8.tar.gz
MFH: fix #35391 (pdo_mysql::exec does not return number of affected rows)
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rwxr-xr-xext/pdo_mysql/mysql_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 0b5570e39c..295723056d 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -244,7 +244,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 {