Τη Τετάρτη, 27 Μαρτίου 2013 9:28:35 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 3:48 AM, MRAB <pyt...@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. -- http://mail.python.org/mailman/listinfo/python-list