I want to understand the difference between web.query and web.select.
This is a sqlite query that works:

"SELECT field.B FROM table.A WHERE field.B LIKE '%s' LIMIT '%s'" %(q,
limit)

Here is an attempt at the web.select and web.query statements:

for row in web.select('table.A',
        what='field.B',
        where='field.B LIKE $q',
        limit=limit,
        vars={'q':q}):
        print row

for row in web.query("""
        SELECT field.B FROM table.A
        WHERE field.B LIKE $q
        LIMIT $limit)""",
        vars={('q':q), ('limit':limit)}:
        print row

Are these statements equivalent?  If so, why choose one over the
other?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to