2008年8月26日星期二

[fw-db] How to Increment a field by 1 using Update()

hi
i need to increment one of my field value by 1 using the update ()

i tried this code
but didnt work for me

$table = 'products';
$data = array('prd_qnty' => 'prd_qnty'+1);
$where[] = $db->quoteInto('pr_id = ?', $this->pr_id);
$db->update($table, $data, $where);

Please help

Regards
Anees


--
View this message in context: http://www.nabble.com/How-to-Increment-a-field-by-1-using-Update%28%29-tp19161309p19161309.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: