Created
January 8, 2014 07:13
-
-
Save stefanmonkey/8312969 to your computer and use it in GitHub Desktop.
get data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import MySQLdb as mdb | |
con = mdb.connect('localhost', 'testuser', '123456', 'testdb'); | |
with con: | |
cur = con.cursor() | |
cur.execute("SELECT * FROM Writers") | |
rows = cur.fetchall() | |
for row in rows: | |
print row |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment