[英]Zend Update query with IN using $db->quote()
Can any one tell where i am going wrong ? 谁能告诉我我要去哪里错了?
$tmp = array();
$tmp[] = 'account';
//$tmp[] = 'tomwased';
// $tmp = 'eshantsahu,account';
$qu = $this->_db->quote($tmp);
// print_r($qu);
$this->_db->update('user',array('password' => 'dddd'),array("username IN ( ? )"=> $qu));
Try using next one 尝试使用下一个
$updateData = array('username' => 'newvalue');
$whereConditions = array();
$whereConditions[] = $this->_db->quoteInto('param1 = ?', 'val1');
$whereConditions[] = $this->_db->quoteInto('param2 IN (?)', array('val2','val3');
$whereConditions = join(" AND ", $whereConditions);
$this->_db->update($updateData, $whereConditions);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.