db = pymysql.connect(host='172.16.0.162', port=3306, user='root', passwd='123456', db='mark', charset='utf8')
cursor = db.cursor()
sql = 'select id from m_news_tb where news_title="'+title+'"'
cursor.execute(sql)
db.commit()
python---------直接操做数据库
猜你喜欢
转载自www.cnblogs.com/11wangxin7/p/11613297.html
今日推荐
周排行