It returns Rows object with only one record in it. I want to delete only one record from the Rows object.
On Saturday, 13 September 2014 22:24:08 UTC+5:30, Anthony wrote: > > You can try: > > session.exrows = session.exrows.find(lambda r: r.id == session.exrows[ > session.counter].id) > > Keep in mind that will not delete the record from the database -- only > from the Rows object itself. > > Anthony > > On Saturday, September 13, 2014 12:12:39 PM UTC-4, Gliese 581 g wrote: >> >> I have fetched large number of rows from a database. I am fetching the >> rows from database and storing it in a session. Now when I delete a record >> for some reasons I do not want to get the entire data back but just delete >> the corresponding row from the Rows object. I have the index of deleted >> record. I am trying to do it using following code: >> >> *del session.exrows[session.counter]* >> >> But it says "TypeError: 'Rows' object does not support item deletion" >> >> How do I delete it from Rows object? >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

