I'm building a web2py controller in which I need to query a table for a combination of value x in one field AND value y in a second field (in the same row). To query on a single field, I would just write
db.table.field == x
But I don't know how to write a query that looks for field==x AND field2==y