Keeping it simple. I am trying to execute this:
c.execute("SELECT id FROM users LIMIT 10 WHERE email IS NULL")
it gives me the following error:
c.execute("SELECT id FROM users LIMIT 10 WHERE email IS NULL") sqlite3.OperationalError: near "WHERE": syntax error
That line, however, works perfectly if I remove the limit clause like this:
c.execute("SELECT id FROM users WHERE email IS NULL")
What's wrong with LIMIT 10? I tried enclosing it in [ ] and it still didn't work.
Aucun commentaire:
Enregistrer un commentaire