Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'mrab': 0.05; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'random': 0.14; "'%s':": 0.16; 'hits': 0.16; 'placeholder': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'thu,': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'header :User-Agent:1': 0.23; 'tells': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; '3.x': 0.31; 'file': 0.32; 'open': 0.33; 'received:209.85': 0.35; 'received:google.com': 0.35; 'there': 0.35; '2.6': 0.36; 'subject:?': 0.36; 'received:209': 0.37; 'subject:. ': 0.67; 'between': 0.67; 'mar': 0.68; 'line,': 0.68; 'look.': 0.84; '\xcc\xe1\xf1\xf4\xdf\xef\xf5': 0.84; '2013': 0.98 X-Received: by 10.49.85.35 with SMTP id e3mr1557058qez.7.1364413342301; Wed, 27 Mar 2013 12:42:22 -0700 (PDT) Newsgroups: comp.lang.python Date: Wed, 27 Mar 2013 12:42:22 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.83.207; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> <8ada8de4-1cb2-4fbb-ae4f-8c0d47c1cf40@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.83.207 MIME-Version: 1.0 Subject: Re: MySQLdbd error. Perhpas it isn't installed? From: =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-7 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364413351 news.xs4all.nl 6893 [2001:888:2000:d::a6]:33984 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42035 =D4=E7 =D4=E5=F4=DC=F1=F4=E7, 27 =CC=E1=F1=F4=DF=EF=F5 2013 9:28:35 =EC.=EC= . UTC+2, =EF =F7=F1=DE=F3=F4=E7=F2 Chris Angelico =DD=E3=F1=E1=F8=E5: > On Thu, Mar 28, 2013 at 3:48 AM, MRAB wrote: > > A brief look at the documentation tells me that MySQL uses '?' as the > > placeholder instead of '%s': > cur.execute('''SELECT hits FROM counters WHERE url =3D ?''', (page, )) > This is what you need to do. The following works in python 2.6 [code] cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''') , (page,) [/code] is there a difefrence between the above and the follwong which works in pyt= hon 3.x [code] cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''' , (page,) ) [/code] I'am confused. Which one is the correct? Also now http://superhost.gr seems to stuck in the following line which i t= ry to open an acii file to slect a random line, please take a look.