Merge #15742: clarify sqlite parameter substitution example.
Suggestion and patch by Mike Hoy.
This commit is contained in:
commit
1ea50f5608
|
@ -60,7 +60,7 @@ example::
|
||||||
c.execute("select * from stocks where symbol = '%s'" % symbol)
|
c.execute("select * from stocks where symbol = '%s'" % symbol)
|
||||||
|
|
||||||
# Do this instead
|
# Do this instead
|
||||||
t = (symbol,)
|
t = ('IBM',)
|
||||||
c.execute('select * from stocks where symbol=?', t)
|
c.execute('select * from stocks where symbol=?', t)
|
||||||
|
|
||||||
# Larger example
|
# Larger example
|
||||||
|
|
Loading…
Reference in New Issue