php - Zend Framework delete rows doesn't work? -


i have same problem of zend_db_table: delete multiple entries, code of fireeyedboy sames not working. haven't errors db entries still exist. can do? code in model identically in effect:

public function deleteusers($usernames) //elimina piĆ¹ utenti passati con una stringa {     $where = array();     foreach ($usernames $username) {     $where[] = $this->getadapter()->quoteinto('username in (?)', $username);     }      $this->delete($where); } 

where $usernames array dinamically created multicheckbox selection. assign parameters array in way in controller:

$list=$this->getrequest()->getparam('utenti'); $this->_adminmodel->deleteusers($list); $this->_redirector->gotosimple('success',                                'admin',                                 null); 

for same reason code go successaction not deleting.

omit foreach loop. if $usernames array of usernames, deleteusers method should this:

public function deleteusers($usernames) {     $where = $this->getadapter()->quoteinto('username in (?)', $usernames);     $this->delete($where); } 

if not, please post output of var_dump($usernames).


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -