From a526db79562dabdb855f2369d3b08700af2a717a Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Fri, 25 Nov 2005 12:54:18 +0000 Subject: [PATCH] fix #35391 (pdo_mysql::exec does not return number of affected rows) --- ext/pdo_mysql/mysql_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 6683e5bba6..35e12fd2e7 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -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 { -- 2.50.1