cvs: pear /DB/DB mysql.php

From: Date: Wed, 14 Aug 2002 08:55:15 +0000
Subject: cvs: pear /DB/DB mysql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5734@lists.php.net to get a copy of this message
sander Wed Aug 14 04:55:15 2002 EDT Modified files: /pear/DB/DB mysql.php Log: Fix notice with 4.3.0-dev: mysql_escape_string() is deprecated. Backwards compatible with earlier versions. Index: pear/DB/DB/mysql.php diff -u pear/DB/DB/mysql.php:1.7 pear/DB/DB/mysql.php:1.8 --- pear/DB/DB/mysql.php:1.7 Wed Jul 31 08:02:40 2002 +++ pear/DB/DB/mysql.php Wed Aug 14 04:55:15 2002 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.7 2002/07/31 12:02:40 mj Exp $ +// $Id: mysql.php,v 1.8 2002/08/14 08:55:15 sander Exp $ // // Database independent query interface definition for PHP's MySQL // extension. @@ -668,7 +668,11 @@ return $str; case 'string': default: - return "'".mysql_escape_string($str)."'"; + if(function_exists('mysql_real_escape_string')) { + return "'".mysql_real_escape_string($str, $this->connection)."'"; + } else { + return "'".mysql_escape_string($str)."'"; + } } } @@ -854,4 +858,4 @@ // binmode } -?> \ No newline at end of file +?>

« previous php.pear.cvs (#5734) next »