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


Groups > comp.lang.python > #42035

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

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 <nikos.gr33k@gmail.com>
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 <mailman.3821.1364412524.2939.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=94.68.83.207; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4
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> <mailman.3821.1364412524.2939.python-list@python.org>
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 Νίκος Γκρ33κ <nikos.gr33k@gmail.com>
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 <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>
Message-ID <mailman.3823.1364413351.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


Τη Τετάρτη, 27 Μαρτίου 2013 9:28:35 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:

> 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.


The following works in python 2.6

[code]
	cur.execute( '''SELECT hits FROM counters WHERE url = %s''') , (page,)
[/code]

is there a difefrence between the above and the follwong which works in python 3.x

[code]
	cur.execute( '''SELECT hits FROM counters WHERE url = %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 try to open an acii file to slect a random line, please take a look.

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