Update multiple row in Zend -


i trying figure out how update multiple row in 1 update() in zend framework.

i have array of ids named ids , update 1 field of rows of these ids.

i tried create condition :

$where = bootstrap::$db->quoteinto('id_task in (?)', $ids); 

and call update method :

$this->getdbtable()->update(array("deleted" => 1), $where); 

but have syntax error or access violation error , query looks in debug output :

array(2) {             [0]=>             &string(54) "update `tasks` set `deleted` = ? (id_task in ())"             [1]=>             &array(1) {               [0]=>               int(1)             }           } 

does know how pass array in condition of update?

maybe way:

$where = bootstrap::$db->quoteinto('id_task in (?)', implode( ',', $ids ) ); 

suppose ids integers , have been validated.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -