MySQLdbd error. Perhpas it isn't installed?

Νίκος Γκρ33κ nikos.gr33k at gmail.com
Wed Mar 27 22:24:05 EDT 2013


I think i have figured this out:

cur.execute( '''SELECT hits FROM counters WHERE url = %s''') , (page,)

is a tuple of two objects. The first is the result of 
cur.execute( '''SELECT hits FROM counters WHERE url = %s''')
and the second is
(page,)


cur.execute( '''SELECT hits FROM counters WHERE url = %s''' , (page,) )
is the result of the execute method of the cur object called with two arguments.



>>> int('10010110101', 2)
1205
>>> int('10010110101'), 2
(10010110101, 2)
>>>

Is this correct?



More information about the Python-list mailing list