Permalink
Browse files

edit

  • Loading branch information...
1 parent 94919cd commit 7fe73b17ff0f47a63230521f816c0f013c076001 @irrelative irrelative committed with anandology May 17, 2008
Showing with 22 additions and 0 deletions.
  1. +22 −0 cookbook/update.md
View
22 cookbook/update.md
@@ -0,0 +1,22 @@
+---
+layout: default
+title: db.update
+---
+
+# db.update
+
+### Problem
+
+You want to update data that's been entered into a database.
+
+### Solution
+
+ import web
+
+ db = web.database(dbn='postgres', db='mydata', user='dbuser', pw='')
+ db.update('mytable', where="id = 10", value1 = "foo")
+
+See the [select](/cookbook/select) for more information on arguments that are accepted by update.
+
+
+The update method returns the number of rows updated.

0 comments on commit 7fe73b1

Please sign in to comment.