Select fails when cookie tried to get a numeric value

Νίκος Αλεξόπουλος nikos.gr33k at gmail.com
Sat Oct 5 10:30:53 EDT 2013


Στις 5/10/2013 5:28 μμ, ο/η Chris Angelico έγραψε:
> On Sun, Oct 6, 2013 at 12:24 AM, Νίκος Αλεξόπουλος
> <nikos.gr33k at gmail.com> wrote:
>> But i have given you the line that produces the error:
>
> The statement you quoted is an INSERT. The traceback quotes a SELECT.
> These are not the same line of code. You still have not shown us the
> actual line from the traceback.
>
> ChrisA
>
Every mysql statemtns that involved cookieID fails.

in this example this:

# find the visitor record for the (saved) cID and current host
cur.execute('''SELECT * FROM visitors WHERE counterID = %s and cookieID 
= %s''', (cID, cookieID) )
data = cur.fetchone()        #cookieID is unique

-- 
What is now proved was at first only imagined! & WebHost
<http://superhost.gr>



More information about the Python-list mailing list