i have a hopefully simple Problem with an SQL-command
Code:
c.execute("SELECT MAX(pic_num) FROM Pictures WHERE id = "+str(user_id))
pic_num is a column in the database and user_id is an Integer in the database
I thought everything would be right but i get this Error:
sqlite3.OperationalError: near ")": syntax error
this Information doesn't help me at all
c.execute("SELECT MAX(pic_num) FROM Pictures WHERE id = ?", str(user_id))