quoteInto()和Zend_DB生成错误

时间:2011-11-02 16:45:57

标签: zend-db

我写了一段代码来查看记录是否已经在db中,代码是这样的:

$sql = $dbRead->quoteInto('SELECT email FROM betaEmail WHERE validate = ?'.$_POST['validate']);

并且对于连接,我使用的是Zend_Db_Adapter_Pdo_Mysql。生成以下错误,我应该从中做出什么?有解决方案吗

Warning: Missing argument 2 for Zend_Db_Adapter_Abstract::quoteInto(), called in
/Applications/MAMP/htdocs/myform/user_registration.php on line 16 and defined in
/Users/payam/php_library/ZendFramework-1.11.8/library/Zend/Db/Adapter/Abstract.php
on line 927

1 个答案:

答案 0 :(得分:1)

将您的.更改为,

$sql = $dbRead->quoteInto('SELECT email FROM betaEmail WHERE validate = ?', $_POST['validate']);