yes please; it would be really helpful for beginners like me thank you
On Friday, 28 December 2012 12:56:44 UTC+5, Massimo Di Pierro wrote: > > Apparently only in one example: > > http://web2py.com/books/default/search/29?search=**dict > > I can add something about this. > > On Friday, 28 December 2012 01:24:37 UTC-6, at wrote: >> >> thank you massimo for this interesting and very useful tip ... it would >> save my good amount of time >> btw, is this syntax available in web2py documentation? >> >> On Friday, 28 December 2012 12:05:46 UTC+5, Massimo Di Pierro wrote: >>> >>> *db((db[table_name].id == rowid) & (db[table_name][myfld] == >>> "")).update([myfld] = myvalue)* >>> * >>> * >>> *should be* >>> * >>> * >>> *db((db[table_name].id == rowid) & (db[table_name][myfld] == >>> "")).update(**{myfld:myvalue})* >>> * >>> * >>> >>> >>> On Friday, 28 December 2012 00:40:15 UTC-6, at wrote: >>>> >>>> It's working when I give table_name after getting table object >>>> programatically, but when the same syntax is used for column names in >>>> update statement it returns syntax error; please consider the following >>>> statement: >>>> *db((db[table_name].id == rowid) & (db[table_name][myfld] == >>>> "")).update([myfld] = myvalue)* >>>> >>>> thanks >>>> >>>> On Thursday, 27 December 2012 19:41:45 UTC+5, Anthony wrote: >>>>> >>>>> * >>>>> db(db[tname].id <http://db.tname.id/> == rowid).select() >>>>> >>>>> *or just: >>>>> >>>>> db[tname](rowid) >>>>> >>>>> Anthony >>>>> >>>>> On Thursday, December 27, 2012 9:35:55 AM UTC-5, at wrote: >>>>>> >>>>>> >>>>>> Wanted to avoid hard-coding table name in the following statement by >>>>>> using var *tname*, but not successful: any tip pls? >>>>>> *db(db.tname.id == rowid).select* >>>>>> >>>>>> Thanks >>>>>> >>>>>> On Thursday, 27 December 2012 19:10:31 UTC+5, at wrote: >>>>>>> >>>>>>> gr8! >>>>>>> *tname,z=my_rows.colnames[0].split('.')* gave the desired table name >>>>>>> >>>>>>> thanks very much! >>>>>>> >>>>>>> best regards >>>>>>> >>>>>>> On Thursday, 27 December 2012 18:47:07 UTC+5, Massimo Di Pierro >>>>>>> wrote: >>>>>>>> >>>>>>>> Yes and No. You can get rows.colnames and they contain table names >>>>>>>> . field name >>>>>>>> >>>>>>>> On Thursday, 27 December 2012 07:45:52 UTC-6, at wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> How can we get table name from ROWS object? >>>>>>>>> >>>>>>>>> Thanks >>>>>>>>> >>>>>>>> --

