I suggest you to have a look there : http://web2py.com/examples/default/examples => go to example 29
Your first try is a bit 'curious' and I don"t think it this what you want to do. Another easy way to experiment web2py is using the wizard: _ Launch the wizard _ Create tables (read the comments) _ Create the fields => generate and have a look to db_wizard.py .... On 15 déc, 23:02, Hybride <mshybr...@gmail.com> wrote: > Hi everyone, > > Am currently using SQLite3 but have no issues moving over to MySQL, > whichever is easier I guess. I've been trying to create the database > tables using the examples on web2py (like the whole pets/dog example), > copying and pasting the code from that example into my own > application, then trying to generate the tables. I've also tried to > create my own tables, with the code: > > db.define_table('person',Field('person')) > > Placing that in the controller, and letting it go free. I think you > can guess that it was unsuccessful. Is there any tutorial on web2py > that shows how to step-by-step create the tables? Do you have to first > create the tables in the database itself, then use define_table (I've > tried, unsuccessful)? > > In any case, if anyone could point me in the right direction to said > tutorials (or give me the gist of it themselves, in MySQL preferably), > that would be greatly appreciated.