Guest User

Untitled

a guest
Dec 9th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import pymysql.cursors
  2. conn = pymysql.connect(host="xx.xxx.xx.xx",
  3. user="users",
  4. password="pass",
  5. db="baza",
  6. charset='utf8',
  7. )
  8. sql = "SELECT ID,Pp FROM test"
  9. cur = conn.cursor()
  10. cur.execute(sql)
  11. data=cur.fetchall()
  12. for row in data:
  13. print(row)
  14.  
  15. conn.commit()
Add Comment
Please, Sign In to add comment