This does delete the row from the actual database table.... acts on the database row.delete_record() row.update_reocrd()
works on the recordset. row.delete() row.update() This is because delete() and update() are python builtin dict functions, that is why it uses this naming scheme. -Thadeus On Wed, Feb 10, 2010 at 11:13 AM, Auden RovelleQuartz <oves....@gmail.com> wrote: > thanks for the quick response! > question this seems to be modifying a record set - what if I need to > literally delete the row from the actual database table (instead of from a > recordset copy of the table)? > > On Wed, Feb 10, 2010 at 11:06 AM, Thadeus Burgess <thade...@thadeusb.com> > wrote: >> >> rows = db(db.bid.id > 0).select(limitby=(1, 2), orderby=db.bid.id) >> >> rows.first().delete_record() >> >> Test that out a bit see if it does what you want. >> >> -Thadeus >> >> >> >> >> >> On Wed, Feb 10, 2010 at 10:59 AM, Auden RovelleQuartz >> <oves....@gmail.com> wrote: >> > I hope this is a simple question: >> > >> > Specifically (syntax-wise) how does one delete a specific table row, >> > but INDEPENDENT of the ".id" field? >> > >> > for example, lets say that I have the following rows in a database >> > table: >> > >> > bid.id bid.bid_id >> > 1 LJWI >> > 2 LJWJ >> > 3 LJWK >> > 4 LJWL >> > >> > I know that I can use the id field to specify the row to be deleted >> > and end up with: >> > >> > bid.id bid.bid_id >> > 1 LJWI >> > 3 LJWK >> > 4 LJWL >> > >> > >> > but what if the table will be regularly experiencing row deletions >> > (from multiple other users), I have a table now looking like for >> > example >> > >> > bid.id bid.bid_id >> > 17 LJWI >> > 32 PWRT >> > 54 AWQS >> > 116 IYRF >> > >> > >> > If i want to repeatedly delete the SECOND ROW of the table (and I >> > don't know nor care what the id field is), what is the syntax to >> > specify that I simply want to delete the second row of table 'bid' >> > without referencing any of the fields? >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "web2py-users" group. >> > To post to this group, send email to web...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > web2py+unsubscr...@googlegroups.com. >> > For more options, visit this group at >> > http://groups.google.com/group/web2py?hl=en. >> > >> > > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.