SHARE
TWEET

Untitled

a guest Jun 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (1, 'PENELOPE'**,** 'GUINESS'**,** datetime.datetime(2006, 2, 15, 4, 34, 33))
  2. (2, 'NICK'**,** 'WAHLBERG'**,** datetime.datetime(2006, 2, 15, 4, 34, 33))
  3. (3, 'ED'**,** 'CHASE', datetime.datetime(2006, 2, 15, 4, 34, 33))
  4. (4, 'JENNIFER'**,** 'DAVIS'**,** datetime.datetime(2006, 2, 15, 4, 34, 33))
  5. (5, 'JOHNNY'**,** 'LOLLOBRIGIDA'**,** datetime.datetime(2006, 2, 15, 4, 34, 33))
  6.      
  7. import mysql.connector
  8.  
  9. mydb = mysql.connector.connect(
  10.   host="localhost",
  11.   user="root",
  12.   passwd="2153417",
  13.   database="sakila"
  14. )
  15. tweets = open("keywords.txt", "w")
  16. mycursor = mydb.cursor()
  17. mycursor.execute("SELECT * FROM actor")
  18.  
  19. with open("C:/Users/Erhan/PycharmProjects/MySQL/keywords.txt", "w", newline='') as f:
  20.     for row in mycursor:
  21.         print(row, file=f)
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top