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.423 kB
layout title
default
db.upate 数据更新

db.upate 数据更新

问题

向数据库中更新数据。

解决方案

import web

db = web.database(dbn='postgres', db='mydata', user='dbuser', pw='')
db.update('mytable', where="id = 10", value1 = "foo")

查询 中有更多关于可用参数的信息。

该更新操作会返回更新的影响行数。

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