我在努力
title = "Title here"
url = "http://www.mysite.com/url-goes-here"
cursor.execute("""INSERT INTO `videos_justicevids` (`title`, `pageurl`) VALUES (%s, %s)""",(title, url))
我没有收到错误,但它没有插入到数据库中。
请您参考如下方法:
你需要提交它。
connection.commit()
我在努力
title = "Title here"
url = "http://www.mysite.com/url-goes-here"
cursor.execute("""INSERT INTO `videos_justicevids` (`title`, `pageurl`) VALUES (%s, %s)""",(title, url))
我没有收到错误,但它没有插入到数据库中。
请您参考如下方法:
你需要提交它。
connection.commit()