MySQLdbd error. Perhpas it isn't installed?

Νίκος Γκρ33κ nikos.gr33k at
Wed Mar 27 20:13:48 CET 2013

Τη Τετάρτη, 27 Μαρτίου 2013 9:06:27 μ.μ. UTC+2, ο χρήστης Joel Goldstick έγραψε:

> You should print the sql statement to see what is being created.  Create the > > >sql, and assign it to a variable name.  Print that.  Then execute the command.

Ok Joe, i just tried the followinf as you suggested to me:

	sql = '''SELECT hits FROM counters WHERE url = %s'''
	print( sql )
	cur.execute( sql , (page,) )
	data = cur.fetchone()
except MySQLdb.ProgrammingError as e:
	print ( "Query Error: ", dir( sys.exc_info()[1] ) )


please look at now, weird errors! encoding issues perhaps?!

More information about the Python-list mailing list