Re: cvs: php-src /ext/pdo_mysql mysql_driver.c

From: Date: Mon, 11 Jul 2005 14:25:07 +0000
Subject: Re: cvs: php-src /ext/pdo_mysql mysql_driver.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-32864@lists.php.net to get a copy of this message
Andrey, According to MySQL C API mysql_affected_rows() can return -1 indicating an error, hence the check in the code. Ilia Andrey Hristov wrote:
andrey Mon Jul 11 09:52:15 2005 EDT - long c = mysql_affected_rows(H->server); - return c >0 ? c : 0; + return mysql_affected_rows(H->server); } }
You remove the initial '"', but left the trailing one?
@@ -242,11 +241,9 @@ { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; *quoted = emalloc(2*unquotedlen + 3); - (*quoted)[0] = '"'; *quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen); - (*quoted)[*quotedlen + 1] = '"'; - (*quoted)[*quotedlen + 2] = '\0'; - *quotedlen += 2; + (*quoted)[0] =(*quoted)[*quotedlen + 1] = '"'; + (*quoted)[*quotedlen+=2] = '\0'; return 1; }
Ilia

« previous php.cvs (#32864) next »