[英]Zend Update query with IN using $db->quote()
誰能告訴我我要去哪里錯了?
$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));
嘗試使用下一個
$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.