Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42032

Re: MySQLdbd error. Perhpas it isn't installed?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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.96; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'encoding': 0.05; 'mrab': 0.05; 'column': 0.07; "'%s':": 0.16; 'clear.': 0.16; 'comma': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hits': 0.16; 'placeholder': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'thu,': 0.19; 'error': 0.23; 'tells': 0.24; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'received:209.85': 0.35; 'no,': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'changing': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'that,': 0.38; 'skip:_ 30': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; "you've": 0.63; 'more': 0.64; 'subject:. ': 0.67; 'mar': 0.68; 'attacks.': 0.84; 'opens': 0.91; 'responses': 0.93; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=h44TvuhtMVWRydXwsxxaFLcNDFWVmNzVnCXTcZS7gXg=; b=rV/9fGSDF2SXgoRUDX/9lyERIF6GP9lAWDokoysACf9+Ll6FTV2gItMQp9K7PQ5+2O u2DMOL1HiKJbBtUo8fAIjgM5nGiL+/ndtoO3K0HHL0qJOO1Y0FzlDqpOl3TOROeTQV+q mvJI43Ny8+6VMKpNBaoOk0lhNHSNh/isbKB3poL0kiouNSaMePc1h8YAtmN1Eki91czW smGOXIB/a8tevdIHS43qZxydshxxYyjCBlHZpLlaWsNF0t605CTFpnC+8JpJ4GdW3H52 TqZrSObIk+t1T3ycwzxPe0qslmtQG0ZlUJ6FwdCtkH9Lxs5hPuimniR7/Vo0A2yb7Rj6 0XVA==
MIME-Version 1.0
X-Received by 10.58.50.7 with SMTP id y7mr24781895ven.24.1364412515825; Wed, 27 Mar 2013 12:28:35 -0700 (PDT)
In-Reply-To <8ada8de4-1cb2-4fbb-ae4f-8c0d47c1cf40@googlegroups.com>
References <f0bde519-61c9-4dfb-a097-48e348fd5c75@googlegroups.com> <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> <mailman.3813.1364402927.2939.python-list@python.org> <mailman.3817.1364409562.2939.python-list@python.org> <8ada8de4-1cb2-4fbb-ae4f-8c0d47c1cf40@googlegroups.com>
Date Thu, 28 Mar 2013 06:28:35 +1100
Subject Re: MySQLdbd error. Perhpas it isn't installed?
From Chris Angelico <rosuav@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3821.1364412524.2939.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1364412524 news.xs4all.nl 6880 [2001:888:2000:d::a6]:52697
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:42032

Show key headers only | View raw


On Thu, Mar 28, 2013 at 5:48 AM, Νίκος Γκρ33κ <nikos.gr33k@gmail.com> wrote:
> I had encoding isseus as well!
>
> Now i tried your suggestion changing comma with '%' and now the error is more clear.
>
> [code]
> _mysql_exceptions.OperationalError: (1054, "Unknown column 'index.html' in 'where clause'")
> [/code]

No, don't do that, that opens you up to SQL injection attacks. Read
the responses you've been given:

On Thu, Mar 28, 2013 at 3:48 AM, MRAB <python@mrabarnett.plus.com> 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 = ?''', (page, ))

This is what you need to do.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-26 14:24 -0700
  Re: MySQLdbd error. Perhpas it isn't installed? MRAB <python@mrabarnett.plus.com> - 2013-03-27 00:41 +0000
  Re: MySQLdbd error. Perhpas it isn't installed? rurpy@yahoo.com - 2013-03-26 21:26 -0700
    Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-26 23:42 -0700
      Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 00:26 -0700
        Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 02:58 -0700
      Re: MySQLdbd error. Perhpas it isn't installed? MRAB <python@mrabarnett.plus.com> - 2013-03-27 16:48 +0000
        Re: MySQLdbd error. Perhpas it isn't installed? nagia.retsina@gmail.com - 2013-03-27 11:15 -0700
        Re: MySQLdbd error. Perhpas it isn't installed? nagia.retsina@gmail.com - 2013-03-27 11:15 -0700
        Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 11:27 -0700
        Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 11:27 -0700
          Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 11:48 -0700
            Re: MySQLdbd error. Perhpas it isn't installed? Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-27 15:06 -0400
              Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 12:13 -0700
              Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 12:13 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 12:23 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 12:23 -0700
            Re: MySQLdbd error. Perhpas it isn't installed? Chris Angelico <rosuav@gmail.com> - 2013-03-28 06:28 +1100
              Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 12:42 -0700
              Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 12:42 -0700
          Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 11:48 -0700
      Re: MySQLdbd error. Perhpas it isn't installed? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-03-27 18:48 -0400
        Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:17 -0700
          Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:19 -0700
            Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:24 -0700
              Re: MySQLdbd error. Perhpas it isn't installed? Chris Angelico <rosuav@gmail.com> - 2013-03-28 13:33 +1100
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:36 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Chris Angelico <rosuav@gmail.com> - 2013-03-28 13:46 +1100
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:57 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:57 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 20:54 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Chris Angelico <rosuav@gmail.com> - 2013-03-28 14:57 +1100
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 20:54 -0700
                Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:36 -0700
            Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:24 -0700
            Re: MySQLdbd error. Perhpas it isn't installed? Chris Angelico <rosuav@gmail.com> - 2013-03-28 13:31 +1100
          Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:19 -0700
        Re: MySQLdbd error. Perhpas it isn't installed? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-27 19:17 -0700

csiph-web