Issue 1475080: example code in what's new/sqlite3 docs (original) (raw)

Issue1475080

Created on 2006-04-23 16:51 by jpryor68, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg28333 - (view) Author: James Pryor (jpryor68) Date: 2006-04-23 16:51
The documentation at <http://docs.python.org/dev/whatsnew/node15.html#SECTION0001540000000000000000> contains the following example code: # Never do this -- insecure! symbol = 'IBM' c.execute("... where symbol = '%s'" % symbol) # Do this instead t = (symbol,) c.execute('select * from stocks where symbol=?', ('IBM',)) The second block should instead read: # Do this instead t = ('IBM',) c.execute('select * from stocks where symbol=?', t)
msg28334 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2006-04-26 12:25
Logged In: YES user_id=11375 Fixed in SVN; thanks for pointing this out.
History
Date User Action Args
2022-04-11 14:56:17 admin set github: 43266
2006-04-23 16:51:23 jpryor68 create