Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pymysql
- conn = pymysql.connect(host='127.0.0.1',user='root',password='',db='networklist')
- a = conn.cursor()
- sql = 'SELECT * from `rios`;'
- a.execute(sql)
- countRow = a.execute(sql)
- print("number of rows :" ,countRow)
- getFirstLine = a.fetchone()
- print(getFirstLine)
Add Comment
Please, Sign In to add comment