0

The exact error message is:

ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Microsoft Access Driver] Syntax error (comma) in query expression 'occupied = False, electric = False, family = False, disabled = False'. (-3100) (SQLExecDirectW)")

I've looked everywhere I can see but don't understand what I'm doing wrong, the line in question is as follows:

spacelist = cursor.execute("SELECT space, distance1, distance2, distance3, distance4, distance5 FROM spaces WHERE occupied = False, electric = True")
2
  • 2
    Try: WHERE occupied = False AND electric = True Commented May 11, 2022 at 13:14
  • The WHERE clause is wrong Commented May 11, 2022 at 13:17

1 Answer 1

2

Try this :

spacelist = cursor.execute("SELECT space, distance1, distance2, distance3, 
distance4, distance5 FROM spaces WHERE occupied = False AND electric = True")
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.