Pyramid Power
Pyramid Power

Reputation: 35

Python MySQLdb failing to insert

I'm trying

title = "Title here"
url = "http://www.mysite.com/url-goes-here"

cursor.execute("""INSERT INTO `videos_justicevids` (`title`, `pageurl`) VALUES (%s, %s)""",(title, url))

I'm not getting an error, but it's not inserting into the database.

Upvotes: 2

Views: 104

Answers (1)

Omnikrys
Omnikrys

Reputation: 2558

You need to commit it.

connection.commit()

Upvotes: 1

Related Questions