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
<[email protected]> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to