database.Table.fieldname()
-- no title -->
database.Table.fieldname()
Syntax
fieldname(q, operator="=", fields="*")
Description
Works exactly like the find() command, except the command name is the name of the field you want to use as a key.
Example
Get the record from the pages table whose title field is "introduction":
db = ximport("database")
book = db.connect("book")
r = book.pages.title("introduction")
This is exactly the same as:
r = book.pages.find("introduction", key="title")