drop sequence todo_id_seq; drop table todo;Look below for resources.
todos = list(db.select('todo', order='id asc'))This is useful if you want to iterate through the list more than once; an iterable object can be iterated through only once.
def query(query_string, vars = {}): return list(db.query(query_string, vars))You can then do something along these lines:
queryString = 'select * from Users where username = $name' varsDict = { 'name' : input.name } result = query(queryString, varsDict)and web.py will handle escaping the user input.