X-Received: by 10.224.185.201 with SMTP id cp9mr12121468qab.6.1364408103317; Wed, 27 Mar 2013 11:15:03 -0700 (PDT) X-Received: by 10.49.3.129 with SMTP id c1mr1495306qec.40.1364408103273; Wed, 27 Mar 2013 11:15:03 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!t2no22386010qal.0!news-out.google.com!k8ni10926qas.0!nntp.google.com!t2no22386004qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Wed, 27 Mar 2013 11:15:03 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.83.207; posting-account=hGu1uQoAAACZy7LiR653nG0NwqDrTyoS NNTP-Posting-Host: 94.68.83.207 References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: MySQLdbd error. Perhpas it isn't installed? From: nagia.retsina@gmail.com Cc: python-list@python.org Injection-Date: Wed, 27 Mar 2013 18:15:03 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.python:42022 =CE=A4=CE=B7 =CE=A4=CE=B5=CF=84=CE=AC=CF=81=CF=84=CE=B7, 27 =CE=9C=CE=B1=CF= =81=CF=84=CE=AF=CE=BF=CF=85 2013 6:48:44 =CE=BC.=CE=BC. UTC+2, =CE=BF =CF= =87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 MRAB =CE=AD=CE=B3=CF=81=CE=B1=CF=88= =CE=B5: > On 27/03/2013 06:42, =CE=9D=CE=AF=CE=BA=CE=BF=CF=82 =CE=93=CE=BA=CF=8133= =CE=BA wrote: >=20 > > =CE=A4=CE=B7 =CE=A4=CE=B5=CF=84=CE=AC=CF=81=CF=84=CE=B7, 27 =CE=9C=CE= =B1=CF=81=CF=84=CE=AF=CE=BF=CF=85 2013 6:26:06 =CF=80.=CE=BC. UTC+2, =CE=BF= =CF=87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 ru...@yahoo.com =CE=AD=CE=B3=CF= =81=CE=B1=CF=88=CE=B5: >=20 > > >=20 > >> If not, maybe you can try adding a print statement to your code that >=20 > >> will print the value of 'page'. This will be easier to do if you >=20 > >> can run you code interactively. If you have to run it via a webserver >=20 > >> than maybe you'll need wrap the print output in html commands to make >=20 > >> it visible on the page, or to write it to a file. >=20 > > >=20 > > >=20 > > I tried what you suggested by doign the following: >=20 > > >=20 > > print( page ) >=20 > > sys.exit(0) >=20 > > cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''', (page,) = ) >=20 > > >=20 > > >=20 > > and the result is printed in the webpage as 'index.html' >=20 > > >=20 > > so page seem s to be a string but the error is still persistant. >=20 > > Anything else i need to try? >=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, )) But as i have it used to work withour problem with pyhton 2.6 Why would it be a problem now?