Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use literal question mark
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
  • Loading branch information
Erlend Egeberg Aasland and CAM-Gerlach authored Aug 3, 2022
commit 1d840ca9533c406ea23baf8298609ac1b670f8f6
2 changes: 1 addition & 1 deletion Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ using :meth:`~Cursor.executemany`::
... ]
>>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?, ?)', data)

Notice that we used question mark placeholders to bind *data* to the query.
Notice that we used ``?`` placeholders to bind *data* to the query.
Always use placeholders instead of :ref:`string formatting<tut-formatting>`
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
to bind Python values to SQL statements,
to avoid `SQL injection attacks`_.
Expand Down