Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import mysql.connector
  2. conn = mysql.connector.connect(host='127.0.0.1', database='t', user='r', password='pwd')
  3. cursor = conn.cursor()
  4. query = ( "select id from T where updated < '%s'" % (run_date) )
  5. cursor.execute(query)
  6. for row in cursor:
  7. print (row)
  8.  
  9. cursor.close()
  10.  
  11. (Decimal('991837'),)
  12. (Decimal('991838'),)
  13. (Decimal('991839'),)
  14. (Decimal('991871'),)
  15. (Decimal('991879'),)
  16. (Decimal('991899'),)
  17. (Decimal('992051'),)
  18. (Decimal('992299'),)
  19. (Decimal('992309'),)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement