Hi. I'm fiddling around with Python and MySql. I keep getting an error with this little script to try and read the rows in a table.
The error is:
TypeError: unsupported operand type(s) for +: 'int' and 'tuple'
Here is the code snippet. Any help would be hugely appreciated
import pymysql
conn=pymysql.connect(host="localhost",user="root",passwd=None,db="grubstreet")
cur=conn.cursor()
cur.execute('SELECT * FROM wp_1_comments')
for r in cur:
print r
cur.close()
conn.close()