I do not understand it, but it works !  (in the book says to do not confuse
update with update_record because for a single row, the method update updates
the row object but not the database record, as in the case of update_record)

Thanks !

On Fri, Jun 24, 2011 at 9:24 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> def update_my_field(tablename, columnname, id,value):
>     db(db[tablename].id==id).update(**{columnname:value})
>
> update_my_field("my_table","my_column","123","hello world")
>
> On Jun 24, 3:08 pm, "Sebastian E. Ovide" <sebastian.ov...@gmail.com>
> wrote:
> > Hi All,
> >
> > how can I do something like this:
> >
> > def update_my_field(tablename, columnname, id,value):
> >     db.tablename(id).update_record(columnname=value)
> >
> > update_my_field("my_table","my_column","123","hello world")
> >
> > thanks
> > --
> > Sebastian E. Ovide
>



-- 
Sebastian E. Ovide

Reply via email to