Help on using "where" select parameter

23 views
Skip to first unread message

Tomas Schertel

unread,
Jun 6, 2012, 11:51:28 AM6/6/12
to we...@googlegroups.com
How can I create a db select using two "where"?
Is this right?

results = db.select('mytable', where="id>100 and active=1")

Thanks.

John Fulton

unread,
Jun 6, 2012, 12:00:04 PM6/6/12
to we...@googlegroups.com
Perhaps you're looking for this?

http://webpy.org/cookbook/where_dict

or you could just write your sql string explicitly and do this:

db.query(sql)

John





--
  John

Tomas Schertel

unread,
Jun 6, 2012, 12:25:04 PM6/6/12
to we...@googlegroups.com
Holly cow. I just missed this page!
Thanks a lot (again) Jon.

On Wednesday, 6 June 2012 13:00:04 UTC-3, fultonj wrote:
Reply all
Reply to author
Forward
0 new messages