I’m trying to insert a new record into the magazine_type table following the code below:
sql = ('INSERT INTO magazine_type (type, description, notes, update_id) VALUES (%s, %s, %s, %s)')
paremeters = ('Lunix', 'The Lunix Magazine', 'The Notes', 300)
cursor = mysql_connect.cursor()
cursor.execute(sql, parameters)
The record will not be inserted until the commit() method of the connection object is done as:
mysql_connect.commit()
Is the mysql_connect.commit() always required with Insert, Update and Delete records?
sql = ('INSERT INTO magazine_type (type, description, notes, update_id) VALUES (%s, %s, %s, %s)')
paremeters = ('Lunix', 'The Lunix Magazine', 'The Notes', 300)
cursor = mysql_connect.cursor()
cursor.execute(sql, parameters)
The record will not be inserted until the commit() method of the connection object is done as:
mysql_connect.commit()
Is the mysql_connect.commit() always required with Insert, Update and Delete records?