mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Fixed typo in example.
This commit is contained in:
parent
5431890938
commit
6199ce5127
|
@ -109,8 +109,8 @@ problems::
|
||||||
>>> SQL = "INSERT INTO authors (name) VALUES ('%s');" # NEVER DO THIS
|
>>> SQL = "INSERT INTO authors (name) VALUES ('%s');" # NEVER DO THIS
|
||||||
>>> data = ("O'Reilly", )
|
>>> data = ("O'Reilly", )
|
||||||
>>> cur.execute(SQL % data) # THIS WILL FAIL MISERABLY
|
>>> cur.execute(SQL % data) # THIS WILL FAIL MISERABLY
|
||||||
ProgrammingError: syntax error at or near "Really"
|
ProgrammingError: syntax error at or near "Reilly"
|
||||||
LINE 1: INSERT INTO authors (name) VALUES ('O'Really')
|
LINE 1: INSERT INTO authors (name) VALUES ('O'Reilly')
|
||||||
^
|
^
|
||||||
|
|
||||||
If the variable containing the data to be sent to the database comes from an
|
If the variable containing the data to be sent to the database comes from an
|
||||||
|
|
Loading…
Reference in New Issue
Block a user