On Monday, May 9, 2011 5:34:28 AM UTC-4, james c. wrote: > > accounts = my_customers_name + '_collections_' + str(auth.user_id) > db.define_table( accounts , > Field('name')) > #which created the expected accounts tables in the db folder. > > # This approach falls apart here: > db.?.insert(name='Big Company') > #If using the same variable, accounts, Web2Py thinks that is the name > of the database. > (3) Is there any way to make this last approach work, or is there any > other alternatives?
Try db[accounts].insert(name='Big Company').