Yes, this is used in crud and appadmin

db['tablename']['fieldname']

############################################
keys = ['table1','table2','table3']
mydict = {}
for key in keys:
   mydict[key] = db(*db[key]['id']*=='some_id').select()
############################################

--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]



2011/2/21 LightOfMooN <[email protected]>

> Is there a way to use variables in queries as table names?
> For example, something like this:
>
> keys = ['table1','table2','table3']
> mydict = {}
> for key in keys:
>    mydict[key] = db(db.KEY.id=='some_id').select()
>
> where key is a name of table.
>

Reply via email to