sqlcommand

Adding varible in SQL command not working with Select statment HELP please

Adding varible in SQL command not working with Select statment HELP please Question: x = int(id_[0]) select_query = "SELECT * FROM files WHERE id = %s" cursor.execute(select_query,x) results = cursor.fetchone() I am using mySQL in python This is the error i get: mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the …

Total answers: 1