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


Groups > comp.lang.python > #42023

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

Newsgroups comp.lang.python
Date 2013-03-27 11:15 -0700
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>
Subject Re: MySQLdbd error. Perhpas it isn't installed?
From nagia.retsina@gmail.com
Message-ID <mailman.3816.1364408106.2939.python-list@python.org> (permalink)

Show all headers | View raw


Τη Τετάρτη, 27 Μαρτίου 2013 6:48:44 μ.μ. UTC+2, ο χρήστης MRAB έγραψε:
> On 27/03/2013 06:42, Νίκος Γκρ33κ wrote:
> 
> > Τη Τετάρτη, 27 Μαρτίου 2013 6:26:06 π.μ. UTC+2, ο χρήστης ru...@yahoo.com έγραψε:
> 
> >
> 
> >> If not, maybe you can try adding a print statement to your code that
> 
> >> will print the value of 'page'.  This will be easier to do if you
> 
> >> can run you code interactively.  If you have to run it via a webserver
> 
> >> than maybe you'll need wrap the print output in html commands to make
> 
> >> it visible on the page, or to write it to a file.
> 
> >
> 
> >
> 
> > I tried what you suggested by doign the following:
> 
> >
> 
> > print( page )
> 
> > sys.exit(0)
> 
> > cur.execute( '''SELECT hits FROM counters WHERE url = %s''', (page,) )
> 
> >
> 
> >
> 
> > and the result is printed in the webpage as 'index.html'
> 
> >
> 
> > so page seem s to be a string but the error is still persistant.
> 
> > Anything else i need to try?
> 
> >
> 
> 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, ))

But as i have it used to work withour problem with pyhton 2.6
Why would it be a problem now?

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