Zend update statement, not database row update

here is my code

$id = $this->user->id; $data['last_cust_code'] = $a_Search['custcode']; $data['last_paid_filter'] = $a_Search['paid']; $data['last_unpd_filter'] = $a_Search['unpaid']; $data['last_group_field'] = $a_Search['grouping']; $data['last_session_code'] = $a_Search['session']; $out = $objDb->update('tblusrusers', $data,array("id = ?"=>$id)); 

profiler output

 UPDATE `tblusrusers` SET `last_cust_code` = ?, `last_paid_filter` = ?, `last_unpd_filter` = ?, `last_group_field` = ?, `last_session_code` = ? WHERE (id = '70') Array ( [1] => TESTAAA [2] => N [3] => N [4] => 1 [5] => 19993E ) 

when I update directly through mysql client its update.

IMPORTANT: When I select the output through the request, I can see the update, but not through phpmyadmin.does, it has something to do with commit statements, I mean that my autocommit is false? for some other am requests using transactions, will this affect my above update request? Help

+4
source share
2 answers

Actually, the problem is that someone from my production team just put $objDb->beginTransaction() but didn’t commit using $objDb->commit() which led to automatic MySQL databases commit false (bcoz at the beginning operator transactions are set to AUTOCOMMIT to false), therefore, to all other requests where it does not work, since the commit does not occur.

+1
source

I have never used Zend, but I think your dataset should be like

 $data = array('last_cust_code' => $a_Search['custcode'], 'last_paid_filter' => $a_Search['paid'], 'last_unpd_filter' => $a_Search['unpaid'], 'last_group_field' => $a_Search['grouping'], 'last_session_code' => $a_Search['session'] ); 
0
source

All Articles