Some of the information here may be outdated, please check the book instead
[edit]
def addnew2():
  #
  #
  #  how to add or insert a new record into a database table
  #  
  #  Given a database model called mod2, containing a table called tbusers
  #  and the fields userid, firstn, lastn, here's how to add a record
  #  
  #
  #  The value returned is the automatically generated numeric record id
  #
  #  By Sterling Hankins 05/24/2008
  #
  # 
  #
  r=mod2.tbusers.insert(userid='RROGE', firstn='Roy', lastn='Rogers')
  return r
© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.