samedi 15 novembre 2014

Python - MySQL - Unknown columns 'http://www.......................' in 'field list'


Vote count:

0




I'm trying to select a record from my MySQL db, the problem is that it returns with this error which i don't understand, i searched on the web for a solution, and there are many similar cases, but none apply to this specific one.


The expression i'm trying to execute is the following:



result = cursor.execute("""select * from urls where domain = '%s';"""%(found_url,))


it is in a try clause and it always goes right to the except giving me this error:



OperationalError(1054, "Unknown column 'http://..................' in 'field list'")


(i omitted the url, the dots act as placeholders)


after some cycles, being in a loop, it stops giving me that error and changes it to this:



ProgrammingError(2014, "Commands out of sync; you can't run this command now")


any idea? i'm going crazy on this one.



asked 1 min ago







Python - MySQL - Unknown columns 'http://www.......................' in 'field list'

Aucun commentaire:

Enregistrer un commentaire