Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'error:': 0.07; 'host,': 0.09; 'wrote': 0.14; '%s,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'problem!': 0.16; 'subject:fails': 0.16; 'subject:when': 0.16; 'exception': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'skip:" 40': 0.26; 'least': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'on,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'gives': 0.31; 'code': 0.31; 'file': 0.32; 'figure': 0.32; 'actual': 0.34; "can't": 0.35; 'no,': 0.35; 'received:google.com': 0.35; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; "you've": 0.63; 'show': 0.63; 'subject:get': 0.81; 'yourself,': 0.95; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=zQl6LiW3DtkD4X6OpBfY6+bt/1TEMwsM91wxgslgeE0=; b=zLDXesfoYOydUqYcZs/DWPCIG4wYTqmkvQLTvvsNIQ8SAoRQSkpHLtX0+414oy3SLN hmr6MoF8y6dMU434XgByVqPjDLlY/m/KrdjFDqjcOuhpio5Tf6on1b4HCXawK6PV8Ffg fOkkg/BuuNPtZf46rkYZ13ibDEhsnd96ukMaqock0559dj1OxFxFwYP/EJmtnch8ldyJ sTtl58l62n5wB0HgbgLdeKkcCu4/2y0hEgHEz+BgekLqkKYkT61/C9BdAk36pu1WFL00 1i0GG6tQrgSJjBG8i9IYafAX3202mMQ5pjUSq+35uNNSKDh9RJIY1I6ywbE4wfPHgYn7 ymNw== MIME-Version: 1.0 X-Received: by 10.68.136.7 with SMTP id pw7mr12010024pbb.106.1380981587272; Sat, 05 Oct 2013 06:59:47 -0700 (PDT) In-Reply-To: References: Date: Sat, 5 Oct 2013 23:59:47 +1000 Subject: Re: Select fails when cookie tried to get a numeric value From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380981591 news.xs4all.nl 15928 [2001:888:2000:d::a6]:45294 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56185 On Sat, Oct 5, 2013 at 11:38 PM, =CD=DF=EA=EF=F2 =C1=EB=E5=EE=FC=F0=EF=F5= =EB=EF=F2 wrote: > cur.execute('''INSERT INTO visitors (counterID, cookieID, host, city, > useros, browser, ref, lastvisit) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)'= '', > (cID, vip, host, city, useros, browser, ref, lastvisit) ) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > The above code i wrote gives me the following error: > > > [Sat Oct 05 13:33:24 2013] [error] [client 108.162.229.114] File > "/home/nikos/public_html/cgi-bin/metrites.py", line 209, in > [Sat Oct 05 13:33:24 2013] [error] [client 108.162.229.114] > cur.execute('''SELECT * FROM visitors WHERE counterID =3D %s and cookieID= =3D > %s''', (cID, vip) ) No, I don't think it does give you that error! Nikos, you've been around this group a good while; why can you not learn to read an exception traceback? Find line 209, which (as Ned said) is the one to focus on, and look at it. If you can't figure it out yourself, at the VERY least do us all a courtesy and show us the actual code that's having the problem! ChrisA