mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#15742: clarify sqlite parameter substitution example.
This commit is contained in:
parent
a8857af37b
commit
07f6ea5506
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,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 = ('RHAT',)
|
||||||
c.execute('SELECT * FROM stocks WHERE symbol=?', t)
|
c.execute('SELECT * FROM stocks WHERE symbol=?', t)
|
||||||
print c.fetchone()
|
print c.fetchone()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue