Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'syntax': 0.03; 'one?': 0.05; 'thats': 0.07; 'if,': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; '%s,': 0.16; 'hits': 0.16; 'statement.': 0.16; 'syntax,': 0.16; 'produces': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'host': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'select': 0.26; 'errors.': 0.27; 'correct': 0.28; 'chris': 0.28; 'that.': 0.30; 'error': 0.30; 'received:google.com': 0.34; 'said,': 0.35; 'received:209.85': 0.35; 'next': 0.35; 'but': 0.36; 'does': 0.37; 'two': 0.37; 'why': 0.37; 'previous': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'page': 0.38; 'where': 0.40; 'different': 0.63; 'gave': 0.65; '8bit%:40': 0.65; '8bit%:43': 0.65; 'date,': 0.65; 'pin': 0.65; 'skip:\xe2 10': 0.66; '8bit%:100': 0.70; '8bit%:92': 0.70; '2013': 0.84 X-Received: by 10.50.108.174 with SMTP id hl14mr483799igb.5.1359038136610; Thu, 24 Jan 2013 06:35:36 -0800 (PST) Newsgroups: comp.lang.python Date: Thu, 24 Jan 2013 06:35:35 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.70.179; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <88306c73-dfa2-44e1-ab0c-d90dba05be1c@googlegroups.com> <774065a6-3d15-4cff-88d8-7f822ed1c0b0@googlegroups.com> <25438e79-de00-463d-9ae3-7ea63e282e4a@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.70.179 MIME-Version: 1.0 Subject: Re: mysql solution From: Ferrous Cranus To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359038146 news.xs4all.nl 6893 [2001:888:2000:d::a6]:43797 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37593 =CE=A4=CE=B7 =CE=A0=CE=AD=CE=BC=CF=80=CF=84=CE=B7, 24 =CE=99=CE=B1=CE=BD=CE= =BF=CF=85=CE=B1=CF=81=CE=AF=CE=BF=CF=85 2013 3:37:24 =CE=BC.=CE=BC. UTC+2, = =CE=BF =CF=87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 Lele Gaifax =CE=AD=CE=B3= =CF=81=CE=B1=CF=88=CE=B5: > How? What's the error message/traceback? REURNING is not a correct mysql syntax thats why it produces errors. > If, as Chris said, MySQL does not support the =E2=80=9CRETURNING=E2=80=9D= syntax, you >=20 > cannot use that. I gave two different solutions in my previous message, >=20 > did you try the =E2=80=9Csimplest=E2=80=9D one? SELECT pin FROM counters WHERE page =3D %s=20 I can do that but then i have to use that pin column's value in my next sta= tement. cursor.execute( '''UPDATE visitors SET hits =3D hits + 1, useros =3D %s, br= owser =3D %s, date =3D %s WHERE pin =3D %s AND host =3D %s''', (useros, bro= wser, date, pin, host))=20