For example here is a function in a controller which adds a few records to 
"mytable".  I guess you already know how to define tables.

def myfunction():
    ...
    db.mytable.insert(user_id=4,court_id=5,perm='C',days=10)
    db.mytable.insert(user_id=4,court_id=5,perm='V',days=365)
    db.mytable.insert(user_id=4,court_id=9,perm='C',days=10)
    db.mytable.insert(user_id=4,court_id=9,perm='V',days=365)
    ...

Try reading the DAL chapter of the book,  it mentions various examples for 
you to follow.
Regards,  David

Reply via email to