2011/3/13 Ole Trenner <[email protected]>: > 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?
Added issue for this. https://github.com/webpy/webpy/issues/49 Anand -- 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.
