Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 5ab2b051c4
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (13 sloc) 0.449 kB
layout title
default
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 for more information on arguments that are accepted by update.

The update method returns the number of rows updated.

Jump to Line
Something went wrong with that request. Please try again.