Advertisement
Guest User

Untitled

a guest
Mar 6th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import mysql.connector
  4.  
  5. cnx = mysql.connector.connect(user='E154817E', password = 'E154817E', database='E154817E', host ='infoweb')
  6. cursor = cnx.cursor()
  7.  
  8. query = ("SELECT ActCode FROM activite WHERE ComLib=%s")
  9.  
  10. ville = ('Croisic',)
  11. cursor.execute(query, ville)
  12.  
  13. for (EquActivitePraticable) in cursor:
  14. print(EquActivitePraticable[0])
  15.  
  16. cursor.close()
  17. cnx.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement