it seems that the answer is to not use db(), but use:
name_of_dal_object(name_of_dal_object.table).select()
also tried the alternate syntax for getting info from the db:
In [10] : print db(db.images_db.image).select()
Traceback (most recent call last):
File "/home/cody/Downloads/web2py/gluon/contrib/shell.py", line 233, in
run
exec compiled in statement_module.__dict__
File "", line 1, in
Fi
Well I tried that, and it gave me:
In [2] : db(db.legacy_db.table).select()
Traceback (most recent call last):
File "/opt/web-apps/web2py/gluon/contrib/shell.py", line 233, in run
exec compiled in statement_module.__dict__
File "", line 1, in
File "/opt/web-apps/web2py/gluon/dal.py", li
ta.
> For table in db.tables:
> column_count = 0
> for field in table.fields
> column_count += 1
> print table.name
> print column_count
>
> On Thursday, April 19, 2012 9:57:57 PM UTC-4, Cody Goodman wrote:
>>
>> I have multiple databases:
>&g
ow.
Thanks in advance for any help.
Sincerely,
Cody Goodman
Going through the web2py book, and noticed an error on this page:
http://web2py.com/books/default/chapter/29/3
def find_by(keyword):
"finds pages that contain keyword for XML-RPC"
return db(db.page.title.contains(keyword).select().as_list()
should be:
def find_by(keyword):
"fi
6 matches
Mail list logo