So we're given this really lame database setup for a project, and then we're asked to do other stuff with it...
Anyways, here's my SQL Statement:
It works perfectly fine if I switch the DELETE with SELECT *Code:t = (userN, offset) c.execute("""DELETE FROM emails WHERE receiver=? ORDER BY date DESC LIMIT 1 OFFSET ?""", t)
The error I'm getting is:
There's no ID or anything unique to each row in the database... There could be duplicate data and whatnot.Syntax error near: "ORDER"
I'm using SQLite 3.6.22 with Python.
Thanks for any help or advice.![]()
Reply With Quote