cvs: pear /MDB2/MDB2/Driver mysql.php
| From: | Lukas Smith | Date: | Sat, 20 May 2006 10:53:50 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-40225@lists.php.net to get a copy of this message | ||
lsmith Sat May 20 10:53:50 2006 UTC
Modified files:
/pear/MDB2/MDB2/Driver mysql.php
Log:
- quote query to prepare
http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/mysql.php?r1=1.113&r2=1.114&diff_format=u
Index: pear/MDB2/MDB2/Driver/mysql.php
diff -u pear/MDB2/MDB2/Driver/mysql.php:1.113 pear/MDB2/MDB2/Driver/mysql.php:1.114
--- pear/MDB2/MDB2/Driver/mysql.php:1.113 Fri May 19 08:29:10 2006
+++ pear/MDB2/MDB2/Driver/mysql.php Sat May 20 10:53:50 2006
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: mysql.php,v 1.113 2006/05/19 08:29:10 lsmith Exp $
+// $Id: mysql.php,v 1.114 2006/05/20 10:53:50 lsmith Exp $
//
/**
@@ -713,7 +713,7 @@
return $connection;
}
$statement_name = 'MDB2_Statement_'.$this->phptype.md5(time() + rand());
- $query = "PREPARE $statement_name FROM '$query'";
+ $query = "PREPARE $statement_name FROM ".$this->quote($query,
'text');
$statement =& $this->_doQuery($query, true, $connection);
if (PEAR::isError($statement)) {
return $statement;