Retrieving possible list for use in a subsequent INSERT

Nick the Gr33k nikos.gr33k at gmail.com
Thu Oct 31 07:19:42 EDT 2013


Στις 31/10/2013 11:32 πμ, ο/η Nick the Gr33k έγραψε:
> The error seen form error log is:
>
> [Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93]
> [Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93] Traceback
> (most recent call last):
> [Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93]   File
> "/home/nikos/public_html/cgi-bin/metrites.py", line 274, in <module>
> [Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93]     (cID,
> refs, host, city, useros, browser, visits, downloads) )
>
> [Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93]
> pymysql.err.InternalError: (1241, 'Operand should contain 1 column(s)')
>
> line 274 is:
>
> # add this visitor entry into database
> cur.execute('''INSERT INTO visitors (counterID, refs, host, city,
> useros, browser, visits, downloads) VALUES (%s, %s, %s, %s, %s, %s, %s,
> %s)''',  (cID, refs, host, city, useros, browser, visits, downloads) )


This error happened at the moment when i decided to insert the 
'downloads' column into the 'visitors' database



More information about the Python-list mailing list