Guest User

Untitled

a guest
Mar 14th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import pymysql
  2.  
  3. conn = pymysql.connect(host='127.0.0.1',user='root',password='',db='networklist')
  4.  
  5. a = conn.cursor()
  6.  
  7. sql = 'SELECT * from `rios`;'
  8.  
  9. a.execute(sql)
  10.  
  11. countRow = a.execute(sql)
  12. print("number of rows :" ,countRow)
  13.  
  14. getFirstLine = a.fetchone()
  15. print(getFirstLine)
Add Comment
Please, Sign In to add comment