hello
i have 4 functions to do the same query.
db(db.mytable1.id>0).select()
db(db.mytable2.id>0).select()
db(db.mytable3.id>0).select()
db(db.mytable4.id>0).select()

Maybe i can use only one like this


def f1(table_to_query):
    row=db(db[table_to_query].id>0).select()

it does not work


what is the correct syntax?


in console i can see that the next  code works
table_to_query='mytable'
print db[table_to_query].fields
output
['id','field1','field2',etc....]

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to