On Sat, 02 Nov 2013 02:06:59 +0200, Nick the Gr33k wrote:
> HOW this 'list' is supposed to get stored into the visitors database?
> What colum is able to handle this list?
A python list is a python datatype. mysql has no equivalent data type to
a python list. You need to convert your python lis
Nick the Gr33k writes:
> sql = '''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)
It was suggested *several* times but I'll reiterate: do not use Py
You can see the erro as its appearing here:
http://superhost.gr/
Its weird that no single quotes are enclosing the string values though
and the other bizarre thign is that 'downloads' list is tryign to fiull
in all the movies.
--
https://mail.python.org/mailman/listinfo/python-list
Στις 2/11/2013 4:00 πμ, ο/η ru...@yahoo.com έγραψε:
On Friday, November 1, 2013 9:04:08 AM UTC-6, Ferrous Cranus wrote:
Rurpy can you help me please solve this?
is enum or set column types what needed here as proper columns to store
'download' list?
I'd help if I could but I don't use MySql an
On Friday, November 1, 2013 9:04:08 AM UTC-6, Ferrous Cranus wrote:
> Rurpy can you help me please solve this?
> is enum or set column types what needed here as proper columns to store
> 'download' list?
I'd help if I could but I don't use MySql and don't know anything
about its column types. Al
Στις 1/11/2013 9:12 μμ, ο/η Denis McMahon έγραψε:
On Thu, 31 Oct 2013 11:32:29 +0200, Nick the Gr33k wrote:
The error seen form error log is:
[Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93]
pymysql.err.InternalError: (1241, 'Operand should contain 1 column(s)')
(cID, refs, host,
"Nick the Gr33k" wrote in message
news:l50oo5$k05$1...@dont-email.me...
> 1/11/2013 7:07 ??, ?/? Paul Simon ??:
>
>> If you have a list of values of the same type, but different values,
>> you need a new table with a foreign key to the table it relates to.
>> This is a relational databa
On Thu, 31 Oct 2013 11:32:29 +0200, Nick the Gr33k wrote:
> The error seen form error log is:
> [Thu Oct 31 09:29:35 2013] [error] [client 46.198.103.93]
> pymysql.err.InternalError: (1241, 'Operand should contain 1 column(s)')
> (cID, refs, host, city, useros, browser, visits, downloads) )
I s
Στις 1/11/2013 7:07 μμ, ο/η Paul Simon έγραψε:
If you have a list of values of the same type, but different values,
you need a new table with a foreign key to the table it relates to.
This is a relational database question. You can read more here:
http://en.wikipedia.org/wiki/Database_normaliz
"Joel Goldstick" wrote in message
news:mailman.1935.1383321401.18130.python-l...@python.org...
On Fri, Nov 1, 2013 at 11:25 AM, Nick the Gr33k
wrote:
> 31/10/2013 9:22 ??, ?/? ru...@yahoo.com ??:
>>
>> On 10/31/2013 03:24 AM, Nick the Gr33k wrote:
>>
>>> [...]
>>> # find out if visitor
Στις 1/11/2013 5:56 μμ, ο/η Joel Goldstick έγραψε:
On Fri, Nov 1, 2013 at 11:25 AM, Nick the Gr33k wrote:
Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
On 10/31/2013 03:24 AM, Nick the Gr33k wrote:
[...]
# find out if visitor has downloaded torrents in the past
cur.execute('
On Fri, Nov 1, 2013 at 11:25 AM, Nick the Gr33k wrote:
> Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
>>
>> On 10/31/2013 03:24 AM, Nick the Gr33k wrote:
>>
>>> [...]
>>> # find out if visitor has downloaded torrents in the past
>>> cur.execute('''SELECT torrent FROM files WHERE ho
Στις 1/11/2013 5:04 μμ, ο/η Nick the Gr33k έγραψε:
Στις 1/11/2013 12:24 πμ, ο/η Nick the Gr33k έγραψε:
Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
You set the value of 'downloads' to a list:
downloads = []
if data:
for torrent in data:
downloads.append( to
Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
On 10/31/2013 03:24 AM, Nick the Gr33k wrote:
[...]
# find out if visitor has downloaded torrents in the past
cur.execute('''SELECT torrent FROM files WHERE host = %s''', host )
data = cur.fetchall()
downloads = []
Στις 1/11/2013 12:24 πμ, ο/η Nick the Gr33k έγραψε:
Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
You set the value of 'downloads' to a list:
downloads = []
if data:
for torrent in data:
downloads.append( torrent )
and when you use 'downloads', use have:
Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
You set the value of 'downloads' to a list:
downloads = []
if data:
for torrent in data:
downloads.append( torrent )
and when you use 'downloads', use have:
INSERT INTO visitors (..
Στις 31/10/2013 9:22 μμ, ο/η ru...@yahoo.com έγραψε:
You set the value of 'downloads' to a list:
downloads = []
if data:
for torrent in data:
downloads.append( torrent )
and when you use 'downloads', use have:
INSERT INTO visitors (..
On 10/31/2013 03:24 AM, Nick the Gr33k wrote:
>[...]
> # find out if visitor has downloaded torrents in the past
> cur.execute('''SELECT torrent FROM files WHERE host = %s''', host )
> data = cur.fetchall()
>
> downloads = []
> if data:
> for torrent in data:
Am 31.10.13 17:49, schrieb Nick the Gr33k:
Στις 31/10/2013 1:19 μμ, ο/η Nick the Gr33k έγραψε:
someone please that is aware of what's wrong?
Your attitude.
--
https://mail.python.org/mailman/listinfo/python-list
Στις 31/10/2013 1:19 μμ, ο/η Nick the Gr33k έγραψε:
Στις 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
Στις 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]
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"
# if first time for webpage; create new record( primary key is
automatic, hit is defaulted ), if page exists then update record
cur.execute('''INSERT INTO counters (url) VALUES (%s) ON DUPLICATE KEY
UPDATE hits = hits + 1''', page )
# get the primary key val
23 matches
Mail list logo