Converting a string to a number by using INT (no hash method)

John Gordon gordon at
Tue Jan 22 21:40:39 CET 2013

In <mailman.829.1358882945.2939.python-list at> Ferrous Cranus <nikos.gr33k at> writes:

> May i sent you my code by mail so for you see whats wrong and
> produces error?

I tried going to that address and got some error output.  I noticed this
in the error dump:

     186         if cursor.rowcount == 0:
     187                 cursor.execute( '''INSERT INTO visitors(pin, host
   , hits, useros, browser, date) VALUES(%s, %s, %s, %s, %s)''', (pin, hos
   t, 1, useros, browser, date) )

The INSERT statement gives six column names but only five placeholders (%s)
in the VALUES clause.

Perhaps that's the problem?

John Gordon                   A is for Amy, who fell down the stairs
gordon at              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

More information about the Python-list mailing list