Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (13 sloc) 0.382 kb
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.

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