Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 21 lines (13 sloc) 0.382 kb
d825045 irrelative adding delete section
irrelative authored
1 ---
2 layout: default
3 title: db.delete
4 ---
5
6 # db.delete
7
37258ca Gregory Sitnin Page was damaged
sitnin authored
8 ### Problem
d825045 irrelative adding delete section
irrelative authored
9
37258ca Gregory Sitnin Page was damaged
sitnin authored
10 You want to delete data that's been entered into a database.
d825045 irrelative adding delete section
irrelative authored
11
37258ca Gregory Sitnin Page was damaged
sitnin authored
12 ### Solution
d825045 irrelative adding delete section
irrelative authored
13
37258ca Gregory Sitnin Page was damaged
sitnin authored
14 import web
d825045 irrelative adding delete section
irrelative authored
15
37258ca Gregory Sitnin Page was damaged
sitnin authored
16 db = web.database(dbn='postgres', db='mydata', user='dbuser', pw='')
17 db.delete('mytable', where="id=10")
d825045 irrelative adding delete section
irrelative authored
18
37258ca Gregory Sitnin Page was damaged
sitnin authored
19 It is also accepts "using" and "vars" parameters.
d825045 irrelative adding delete section
irrelative authored
20
37258ca Gregory Sitnin Page was damaged
sitnin authored
21 The delete method returns the number of rows deleted.
Something went wrong with that request. Please try again.