2009年8月11日星期二

[fw-db] update Zend_Db_Table_Abstract

Hello,

I want to add x to a column (int). In mysql something like this:

update mytable set col1 = col1 + 2 where id = 1

I tried this:

myModel = new MyTableModel();
myModel->update('col1' => 'col1' + $x, 'id = 1');

but this isn't working? Is there a simple way, where I don't have to get the
record first by e.g. fetchRow()?

-----
visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context: http://www.nabble.com/update-Zend_Db_Table_Abstract-tp24925341p24925341.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: