Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import mysql.connector
  2.  
  3. cnx = mysql.connector.connect(user='root', password='1111',
  4. host='127.0.0.1',
  5. database='test')
  6.  
  7. cursor = cnx.cursor()
  8. cursor.execute('SELECT * FROM saif ')
  9. rows = cursor.fetchall()
  10.  
  11. for row in rows:
  12. print row
  13.  
  14. cnx.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement