nikos.gr33k at gmail.com
Thu Jan 24 15:35:35 CET 2013
Τη Πέμπτη, 24 Ιανουαρίου 2013 3:37:24 μ.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε:
> How? What's the error message/traceback?
REURNING is not a correct mysql syntax thats why it produces errors.
> If, as Chris said, MySQL does not support the “RETURNING” syntax, you
> cannot use that. I gave two different solutions in my previous message,
> did you try the “simplest” one?
SELECT pin FROM counters WHERE page = %s
I can do that but then i have to use that pin column's value in my next statement.
cursor.execute( '''UPDATE visitors SET hits = hits + 1, useros = %s, browser = %s, date = %s WHERE pin = %s AND host = %s''', (useros, browser, date, pin, host))
More information about the Python-list