On Sat, Oct 05, 2013 at 05:30:53PM +0300, ????? ??????????? wrote:
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

If every cur.execute() invocation that you try to pass cookieID to
fails, that suggests you can't pass cookieID to cur.execute() ...
perhaps because it's the wrong type.

The use of '%s' string interpolation suggests that cur.execute() is
expecting a string. Is cookieID a string? If not, is it some kind of
object that contains a string value within it? Maybe it has some kind of
attribute you could pass, like cookieID.value or similar?

That may or may not be correct, but it's the kind of mental process you
should be going through to solve your problem.


Zero Piraeus: inter caetera

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 11 of 33 | next ›
Discussion Overview
grouppython-list @
postedOct 5, '13 at 1:38p
activeOct 7, '13 at 2:16a



site design / logo © 2022 Grokbase