I am trying to write a function to remove a row from my data base and receive the following error:
mysql.connector.errors.ProgrammingError: Could not process parameters: int(329231989), it must be of type list, tuple or dict
The Function:
def RemoveStudent (DeleteID):
import mysql.connector
db = mysql.connector.connect (
host="localhost", #
user="root", # התקשרות עם השרת ומאגר המידע
passwd = "root", #
database="FirstProjectDatabase"
)
cursor = db.cursor()
sql = "DELETE FROM Students WHERE ID=%s"
cursor.execute (sql,DeleteID)
db.commit()
I need to find a way to delete rows using integers.