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()

1、代码示例

 2、工具:anaconda 中的 Jupyter(notebook)

posted on 2019-09-30 16:33  圣上不开心吖  阅读(334)  评论(0)    收藏  举报