Hi everyone,
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
<[email protected]>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.