Τη Πέμπτη, 28 Μαρτίου 2013 12:48:54 π.μ. UTC+2, ο χρήστης Dennis Lee Bieber έγραψε: > On Wed, 27 Mar 2013 16:48:44 +0000, MRAB <pyt...@mrabarnett.plus.com> > > declaimed the following in gmane.comp.python.general: > > > > > > > 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, )) > > > > What documentation is that from... MySQLdb has used %s for ages (if > > you look at the source code of the adapter, it actually uses Python's > > string interpolation to fill in the SQL /after/ it has escaped/quoted > > each parameter. > > > > Now, I don't know about the recent "pure Python" MySQL adapter... > > -- > > Wulfraed Dennis Lee Bieber AF6VN > > wlfr...@ix.netcom.com HTTP://wlfraed.home.netcom.com/
So dod i have to use '%s' or (?) what is better? and as for the synatx that i asked in my previous post? what is the correct one? -- http://mail.python.org/mailman/listinfo/python-list