×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import mysql.connector mydb = mysql.connector.connect( host="localhost", user="myusername", password="mypassword", database="mydatabase" ) mycursor = mydb.cursor() sql = "DELETE FROM customers WHERE address = %s" adr = ("Yellow Garden 2", ) mycursor.execute(sql, adr) mydb.commit() print(mycursor.rowcount, "record(s) deleted")
1 record(s) deleted