Hi,

I want to increment a field "nb_login" whenever a member connects.

These are the parameters that I give to update() method.

$where = array('id = ?' => $id);
$data = array(
        'date_connection' => date('Y-m-d H:i:s'),
        'nb_login' => 'nb_login+1'
);

The query is generated is :
UPDATE `patients_accounts` SET `date_connection` = '2010-10-28 12:21:31',
`nb_login` = 'nb_login+1' WHERE (id = 1)

This won't work because 'nb_login+1' is quoted. It would work if the
statement would be : 
`nb_login` = nb_login+1

Thank you for any help
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Zend-Db-data-array-and-quoting-question-tp3016954p3016954.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to