]> granicus.if.org Git - php/commitdiff
MFB51: Make MySQL driver use ANSI complaint quoting style.
authorIlia Alshanetsky <iliaa@php.net>
Sun, 25 Dec 2005 20:30:56 +0000 (20:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 25 Dec 2005 20:30:56 +0000 (20:30 +0000)
ext/pdo_mysql/mysql_driver.c

index 35e12fd2e7e65df725112e2cc962369c3e5bfa59..61298a8721355b0e651d286029f88cb89c0c4314 100755 (executable)
@@ -257,7 +257,7 @@ static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
        pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
        *quoted = safe_emalloc(2, unquotedlen, 3);
        *quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen);
-       (*quoted)[0] =(*quoted)[++*quotedlen] = '"';
+       (*quoted)[0] =(*quoted)[++*quotedlen] = '\'';
        (*quoted)[++*quotedlen] = '\0';
        return 1;
 }