--- library/Zend/Db/Statement.php (revision 9187) +++ library/Zend/Db/Statement.php (working copy) @@ -178,7 +178,7 @@ // get the value used as an escaped quote, // e.g. \' or '' $qe = $this->_adapter->quote($q); - $qe = substr($q, 1, 2); + $qe = substr($qe, 1, 2); $qe = str_replace('\\', '\\\\', $qe); // get a version of the SQL statement with all quoted