If this line:

 db = SQLDB('mysql://username:[email protected]: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:[email protected]: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 <[email protected]> wrote:
> All I do is to the shell in the GUI controller section.
>
> I input db = SQLDB('mysql://username:[email protected]: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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to