Escaping confusion with Python 3 + MySQL
Ian Kelly
ian.g.kelly at gmail.com
Sun Mar 26 10:18:27 EDT 2017
On Sun, Mar 26, 2017 at 8:07 AM, Νίκος Βέργος <me.on.nzt at gmail.com> wrote:
> Τη Κυριακή, 26 Μαρτίου 2017 - 5:04:27 μ.μ. UTC+3, ο χρήστης INADA Naoki This error came from MySQL. If there are no logs in error_log, it's
>> your configuration issue.
>>
>> See https://dev.mysql.com/doc/refman/5.7/en/update.html for Update
>> statement syntax.
>
> cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, browser, visits) VALUES ({}, {}, {}, {}, {}, {}, {}) WHERE host LIKE "%{}%"'''.format(pID, domain, ref, location, useros, browser, lastvisit, domain) )
>
> output of error-log:
You need to change the placeholders back. The poster who told you to
replace them was misinformed.
More information about the Python-list
mailing list