Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'mrab': 0.05; 'one?': 0.05; 'string': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.11; "'%s'": 0.16; "'%s':": 0.16; 'better?': 0.16; 'from...': 0.16; 'hits': 0.16; 'parameter.': 0.16; 'placeholder': 0.16; 'wed,': 0.18; "python's": 0.19; 'cc:addr:python.org': 0.22; 'header:User- Agent:1': 0.23; 'tells': 0.24; 'url:home': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'source': 0.25; 'header:In-Reply- To:1': 0.27; 'correct': 0.29; 'asked': 0.31; 'code': 0.31; 'python"': 0.31; 'received:google.com': 0.35; 'subject:?': 0.36; 'previous': 0.38; 'recent': 0.39; 'subject:. ': 0.67; 'mar': 0.68; 'adapter,': 0.84; 'ages': 0.84; '\xcc\xe1\xf1\xf4\xdf\xef\xf5': 0.84; '2013': 0.98 X-Received: by 10.49.6.66 with SMTP id y2mr1646892qey.18.1364437054174; Wed, 27 Mar 2013 19:17:34 -0700 (PDT) Newsgroups: comp.lang.python Date: Wed, 27 Mar 2013 19:17:34 -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> <515322EC.9080602@mrabarnett.plus.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: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364437057 news.xs4all.nl 6954 [2001:888:2000:d::a6]:47570 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42059 =D4=E7 =D0=DD=EC=F0=F4=E7, 28 =CC=E1=F1=F4=DF=EF=F5 2013 12:48:54 =F0.=EC. = UTC+2, =EF =F7=F1=DE=F3=F4=E7=F2 Dennis Lee Bieber =DD=E3=F1=E1=F8=E5: > On Wed, 27 Mar 2013 16:48:44 +0000, MRAB >=20 > declaimed the following in gmane.comp.python.general: >=20 >=20 >=20 >=20 >=20 > > A brief look at the documentation tells me that MySQL uses '?' as the >=20 > > placeholder instead of '%s': >=20 > >=20 >=20 > > cur.execute('''SELECT hits FROM counters WHERE url =3D ?''', (page, )) >=20 >=20 >=20 > What documentation is that from... MySQLdb has used %s for ages (if >=20 > you look at the source code of the adapter, it actually uses Python's >=20 > string interpolation to fill in the SQL /after/ it has escaped/quoted >=20 > each parameter. >=20 >=20 >=20 > Now, I don't know about the recent "pure Python" MySQL adapter... >=20 > --=20 >=20 > Wulfraed Dennis Lee Bieber AF6VN >=20 > wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/ So dod i have to use '%s' or (?) what is better? and as for the synatx that= i asked in my previous post? what is the correct one?