Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (13 sloc) 382 Bytes
layout title
default
db.delete

db.delete

Problem

You want to delete data that's been entered into a database.

Solution

import web

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

It is also accepts "using" and "vars" parameters.

The delete method returns the number of rows deleted.