On Mon, Aug 24, 2009 at 11:02 PM, jayvandal<[email protected]> wrote:
>
> I tried to get the person_id when I got a last name found, but I could
> not find a way to get the person_id with this code,
......
>> > HI,
>> > I tried this code
>> > =================================================
>> > records=db(db.person.last_name==request.vars.last_name)\
>> > .select(orderby=db.person.last_name)
>> > ===================================================
>> > i see that this will find by last name or partial last name.
You should really get familiar with running commands in a shell, and
be sure to install iPython (it will give you TAB completion)-
then you could try this line, and inspect the results -
python web2py.py -S myapp -M
[1] records=db(db.person.last_name==request.vars.last_name)\
> .select(orderby=db.person.last_name)
[2] len(records)
[3] records[0]
[4] records[0].[TAB]
("[TAB]" I meant just hit the TAB key) - Try it, let us konw what you see...
Regards,
- Yarko
>>
>> > I tried to get the person_id and use it to find all the events for
>> > that person and then display the event records.
>>
>> > Can I do this or should I do this??
>> > Thanks
>> > Jim- Hide quoted text -
>>
>> - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---