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)

浙公网安备 33010602011771号