I've stumbled upon a thing where you can probably help me out.
It seems as if DB.insert(...) creates an invalid query if no values have been specified:
py code:
new_id = mydb.insert('mytable')
generates the query:
"INSERT INTO mytable DEFAULT VALUES"
This query doesn't work in MySQL (although it does in SQLite). I don't know if this is the expected behaviour or not, but so far I had to circumvent this thing by using something like
new_id = mydb.insert('mytable', id=SQLLiteral('DEFAULT'))
(which, unfortunately, doesn't work in SQLite)
Do you know how to fix this or how to create a more database-agnostic solution for inserts without values?
Thanks a lot for your help.
Ole.
--
Ole Trenner
<o...@jayotee.de>
Added issue for this.
https://github.com/webpy/webpy/issues/49
Anand