2013-10-25 109 views
0

任何人都可以告訴我哪裏出錯了嗎?使用

$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)); 

回答

0

嘗試下一個

$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);