I am new to MYSQL and i am facing a very easy problem with MYSQL. I am creating a database that contains a student table , this table contains the student's name , ID( primary key) . I need to delete a record based on the user's choice of id ( call this variable student_id) , so how to write this in a mysql statement using python ? i have tried this but i know it is wrong -->
cur.execute("Delete FROM students WHERE ID = student_id")
con.commit()whereconis your connection object