Anyway to interact with SQL Database?

46 views
Skip to first unread message

Austin Taylor

unread,
Feb 4, 2014, 2:00:40 PM2/4/14
to web...@googlegroups.com
I am using mysql. I've tried importing MySQLdb, pymysql, and importing DAL. I want to have an interactive prompt that I can practice querying tables on.

Richard Vézina

unread,
Feb 4, 2014, 2:32:10 PM2/4/14
to web2py-users
Start web2py with the command line (see web2py API in core chapter) and load your model the switch is -M...

python web2py.py ... -M

It will start a python shell with web2py environnement so you can interactively type you command to web2py...

:)

Richard


On Tue, Feb 4, 2014 at 2:00 PM, Austin Taylor <atayl...@gmail.com> wrote:
I am using mysql. I've tried importing MySQLdb, pymysql, and importing DAL. I want to have an interactive prompt that I can practice querying tables on.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Austin Taylor

unread,
Feb 4, 2014, 2:33:12 PM2/4/14
to web...@googlegroups.com

Perfect!  Thank you

On Feb 4, 2014 2:00 PM, "Austin Taylor" <atayl...@gmail.com> wrote:
I am using mysql. I've tried importing MySQLdb, pymysql, and importing DAL. I want to have an interactive prompt that I can practice querying tables on.

--
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/3BgAmfpELvc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Anthony

unread,
Feb 4, 2014, 2:35:43 PM2/4/14
to web...@googlegroups.com
Do you have an app set up with models for this db? If so, assuming you're running web2py from source, at the command line do:

python web2py.py -S yourapp -M

Anthony
Reply all
Reply to author
Forward
0 new messages