daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Apr 27th, 2016 139 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import mysql.connector
  2.  
  3. conn = mysql.connector.connect(user='root', password='root',
  4.                               host='127.0.0.1',
  5.                               database='footprint')
  6.  
  7. cursor = conn.cursor()
  8. url = 'http://interia.pl'
  9.  
  10. data = ("INSERT INTO domain "
  11.                "(url) "
  12.                "VALUES ('moje dane')")
  13.  
  14. cursor.execute(data)
  15.  
  16. cursor.execute("SELECT * FROM domain")
  17.  
  18. for url in cursor:
  19.     print("Domena: ", url[1])
  20.  
  21. conn.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top