Bug #14419 Updated: Please use Character-enable mysql_escape

From: Date: Tue, 01 Jan 2002 00:11:55 +0000
Subject: Bug #14419 Updated: Please use Character-enable mysql_escape
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-75469@lists.php.net to get a copy of this message
ID: 14419
Updated by: zak
Reported By: ycheng@sinica.edu.tw
Old Status: Open
Status: Assigned
Bug Type: MySQL related
Operating System: All
PHP Version: 4.1.0
Old Assigned To: 
Assigned To: zak
New Comment:

Thanks for the suggestion!

I will investigate this.


Previous Comments:
------------------------------------------------------------------------

[2001-12-11 03:41:15] ycheng@sinica.edu.tw

in file php-4.1.0/ext/mysql/php_mysql.c line 1365
-------------------------------
Z_STRLEN_P(return_value) = mysql_escape_string(Z_STRVAL_P(return_value), Z_STRVAL_PP(str),
Z_STRLEN_PP(str));
-------------------------------
could you change from
mysq_escape_string into mysql_
to something like
#if MYSQL_VERSION_ID < 32321
        len = mysql_escape_string(out, in, size);
#else
        if (self) {
                check_connection(self);
                len = mysql_real_escape_string(&(self->connection), out, in, size);
        }
        else
                len = mysql_escape_string(out, in, size);
#endif

(quote from mysql python module)

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14419&edit=1



Thread (2 messages)

« previous php.dev (#75469) next »