Use params in README

master
baztian 2020-06-16 23:29:40 +02:00
parent 936817b9dc
commit 25ab8bf6a3
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ Here is an example:
... ' "NAME" VARCHAR(50) not null,' ... ' "NAME" VARCHAR(50) not null,'
... ' primary key ("CUST_ID"))' ... ' primary key ("CUST_ID"))'
... ) ... )
>>> curs.execute("insert into CUSTOMER values (1, 'John')") >>> curs.execute("insert into CUSTOMER values (?, ?)", (1, 'John'))
>>> curs.execute("select * from CUSTOMER") >>> curs.execute("select * from CUSTOMER")
>>> curs.fetchall() >>> curs.fetchall()
[(1, u'John')] [(1, u'John')]