I am trying to create a SQL query in a python program and I want to pass in my session variable. The session variable contains the logged in user for the program. I am having some syntax issues.
query = "SELECT * FROM following WHERE following.username == 'flask.session['user']' "
Here is my error:
sqlite3.OperationalError: near "user": syntax error
I am not sure how to fix this. Help would be greatly appreciated.