summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-06-17 18:48:32 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-06-17 18:48:32 (GMT)
commitf2eb4cba1ac122e1ac18c997864bb8c959638f05 (patch)
treea44bf921e0cd6297003da2e5c184609f6ba3e96f /Doc
parentd8f77debd104766f502c8defb396afc1917caab2 (diff)
downloadcpython-f2eb4cba1ac122e1ac18c997864bb8c959638f05.zip
cpython-f2eb4cba1ac122e1ac18c997864bb8c959638f05.tar.gz
cpython-f2eb4cba1ac122e1ac18c997864bb8c959638f05.tar.bz2
SF #1738670, make example in doc work
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libsqlite3.tex6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/lib/libsqlite3.tex b/Doc/lib/libsqlite3.tex
index 19eed7e..a7a0e94 100644
--- a/Doc/lib/libsqlite3.tex
+++ b/Doc/lib/libsqlite3.tex
@@ -42,6 +42,12 @@ c.execute('''create table stocks
# Insert a row of data
c.execute("""insert into stocks
values ('2006-01-05','BUY','RHAT',100,35.14)""")
+
+# Save (commit) the changes
+conn.commit()
+
+# We can also close the cursor if we are done with it
+c.close()
\end{verbatim}
Usually your SQL operations will need to use values from Python