|
|||
|
Hi guys,
I have an application in zend framework structure, and I'm using zend_db, when I try to update table and increment field in this table, exception appear, I passes values as follow: $data = array('lastresettime' => time(), 'verifiedflag' => '0', 'resetcount' => 'resetcount + 1'); when I try to execute it shows error. when I try to use array as follows, it works propaply : $data = array('lastresettime' => time(), 'verifiedflag' => '0'); Are there any one have an idea how to increment field in update zend_db statement?? thx ![]() Last edited by ahmedrezk : 07-03-2008 at 08:05 AM. |
|
|||
|
What ensure that this is an zend_db error, that when I tries to pass array of values as following it works:
Case 1: Not work and exception appear $data = array('lastresettime' => time(), 'verifiedflag' => '0', 'resetcount' => 'resetcount + 1'); Case 2: It works and no problem $data = array('lastresettime' => time(), 'verifiedflag' => '0'); Got it?? ![]() |
|
|||
|
You have modified your first post, but you had an zend_Config exception there.
Here you have problem with storing string ('resetcount + 1') to integer column. You should use PHP Code:
btw. wrap your code in , it is much more readable |
![]() |
| Thread Tools | |
| Display Modes | |
|
|