Escaping confusion with Python 3 + MySQL
me.on.nzt at gmail.com
Sun Mar 26 16:13:13 EDT 2017
Τη Κυριακή, 26 Μαρτίου 2017 - 11:05:34 μ.μ. UTC+3, ο χρήστης Νίκος Βέργος έγραψε:
> Τη Κυριακή, 26 Μαρτίου 2017 - 10:56:07 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> > On Mon, Mar 27, 2017 at 6:33 AM, Νίκος Βέργος <me.on.nzt at gmail.com> wrote:
> > > Since i'm incopetent as you suggest i'am show us your level of skills and expertise and provide a solution, otherwise you are also what you claim of me.
> > It's not his problem. An expert does not have to provide solutions to
> > prove his expertise, unless s/he is suffering from severe self-image
> > problems. Someone who's getting paid to host other people's web sites,
> > on the other hand, needs to solve the problems that come up.
> > ChrisA
> Okey although i beleive my UPDATE query to be correct i'll now try this:
> cur.execute('''UPDATE visitors SET pagesID=%s, host=%s, ref=%s, location=%s, useros=%s, browser=%s, visits=%s WHERE host LIKE %s''', (pID, domain, ref, location, useros, browser, lastvisit, domain_query) )
OMG!!! It actually worked!
Can't believe that 3 days in a row i have tried everything concerning string manipulation and mysql escaping nd the error was the UPDATE itself....
More information about the Python-list