I downloade ipython and it installed it in python26\lib\site packages
\ipython as per the installer..(I am running Windows Vista)
I ran ipython and typed  in
records=db(db.person.last_name==request.vars.last_name)\
           .select(orderby=db.person.last_name)
-----
It didn't like db.
I dont see it relating to the database in sqlite in web2py
Thanks
Jim


On Aug 24, 10:14 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> On Mon, Aug 24, 2009 at 11:02 PM, jayvandal<jayvan...@gmail.com> 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 -- 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 web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to