Even better:

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

========

sql statement seems okey...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to