[web2py] Re: Is it possible to update or insert object to database in one command?

2011-03-25 Thread Sergey Ozhigin
> > > > To know if it exist or not you must have condition in the form of a > > > query. You can do > > > > if not db(query).update(...): db.mytable.insert(...) > > > > where ... is the field='value' list. > > > > On Mar 24, 4:46 am,

[web2py] Is it possible to update or insert object to database in one command?

2011-03-24 Thread Sergey Ozhigin
Hello, Is it possible in web2py to update or insert object (if doesn't exist) to database in one command? Does anybody know an answer? wbr