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

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to