``db().select(db.Record.Name)`` returns a rows object, which acts like a tuple.

-Thadeus





On Thu, Apr 1, 2010 at 5:06 AM, DenesL <[email protected]> wrote:
> thelist=[row.Name for row in db().select(db.Record.Name)]
>
> On Apr 1, 1:41 am, Magnitus <[email protected]> wrote:
>> Hi,
>>
>> assuming that I have a "Record" table with a field called "Name" in
>> the database (all also that there are a bunch of other fields for that
>> table).
>>
>> Assume that I make the following query:
>>
>> Rows = db().select(db.Record.ALL)
>>
>> Is there a way to directly (with one line without having to iterate
>> through each row and create the tuple/list manually) fetch the "Name"
>> field for all the rows in a tuple/List?
>
> --
> 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