If this line:

 db = SQLDB('mysql://username:passw...@127.0.0.1:3306/test_db')

is in the model together with the define_tables,

you do not need to retype it in the shell and you should be able to do

  print db.tables

If you retype:

  db = SQLDB('mysql://username:passw...@127.0.0.1:3306/test_db')

in the shell that you estabilish a second connection from the shell
and this one will have no knowledge about tables.

the DAL does not query the DB about tables. It learns about them from
the model.

Massimo

On Aug 5, 10:30 am, Dutch Opera <dutchop...@gmail.com> wrote:
> All I do is to the shell in the GUI controller section.
>
> I input db = SQLDB('mysql://username:passw...@127.0.0.1:3306/test_db')
> into the shell
>
> I assume that would allow me to have access to the database so I can
> test some query.
>
> Maybee I am missing a step or two...I am trying to follow instructions
> in the web2py book I bought.
>
> Or do I have to create the tables in the shell with sample data?
>
> But...my app is fine...I can go into production anytime....
>
> I have not worked with the shell before.
>
> On 8/5/09, DenesL <denes1...@yahoo.ca> wrote:
>
>
>
> > Dutch,
>
> > are you using the -M flag to auto import all the models?
>
> > web2py.py -S app_name_here -M -P
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to