How can I just Generate Update SQL?

Aug 30, 2008 at 11:16 AM
Update article set viewnum=viewnum+1;
can I generate such sql without select first?
Aug 30, 2008 at 11:21 AM
such as
update article set xxx=1,bbb=2,ccc=4 where cvvv=3 and vvf=4
can I generate such sql?

Aug 30, 2008 at 12:51 PM
Save function use the value of ID to judge if it should generate insert SQL or update SQL.
So you can set ID to the item you want to update to force it generate update SQL.
But I am not recommanded it.
I believe more than 90% requirement of update need to selected it first in the real world.
For example the table which have viewnum need to selected to view it first and then update the viewnum.
And I think the best way to develop software is just use the most simple way to implemented it until we met the performence issue.