Comment 6 for bug 598414

Revision history for this message
aqua (vhx) wrote :

Sorry, last code is incorrect. The below code is copy-pastable to produce the error for me.

import oursql

host = '127.0.0.1'
port = 3303
user = 'test'
pw = 'test'
db = 'test'

database = oursql.connect(host=host, user=user, passwd=pw, db=db, port=port)

print "SQL Connection Established on %s:%s" % (host, port)

cursor = database.cursor()

cursor.execute("""SELECT * FROM `item_db`""");

rows = cursor.fetchall()

for row in rows:
    print row