Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'mrab': 0.05; 'string': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; "'%s':": 0.16; 'from...': 0.16; 'hits': 0.16; 'parameter.': 0.16; 'placeholder': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wed,': 0.18; "python's": 0.19; 'tells': 0.24; 'url:home': 0.24; 'source': 0.25; 'header:X-Complaints-To:1': 0.27; 'code': 0.31; 'python"': 0.31; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'subject:. ': 0.67; 'mar': 0.68; 'adapter,': 0.84; 'ages': 0.84; 'received:108': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: MySQLdbd error. Perhpas it isn't installed? Date: Wed, 27 Mar 2013 18:48:54 -0400 Organization: > Bestiaria Support Staff < References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> <515322EC.9080602@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-73-116-37.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364424563 news.xs4all.nl 6875 [2001:888:2000:d::a6]:46510 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42046 On Wed, 27 Mar 2013 16:48:44 +0000, MRAB declaimed the following in gmane.comp.python.general: > 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 = ?''', (page, )) What documentation is that from... MySQLdb has used %s for ages (if you look at the source code of the adapter, it actually uses Python's string interpolation to fill in the SQL /after/ it has escaped/quoted each parameter. Now, I don't know about the recent "pure Python" MySQL adapter... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/