On Fri, Jul 11, 2008 at 8:49 AM, paul jobs <[EMAIL PROTECTED]> wrote:
> http://rafb.net/p/u7ahBK46.html
>
> This is what i have so far
> do help me
>
> I need to query tables that are already there created using normal sql
>
> Can someone show how to query a simple table and construct results
> similar to db.select or db.query
> for
> CREATE TABLE todo (
>  id serial primary key,
>  title text,
>  created timestamp default now(),
>  done boolean default 'f'    );
>

have u ever read the doc of sqlalchemy ? It's a little complicated to
understand, but it's very easy to use.

you could use it like this:
>>> for user in session.query(User).filter("id<224").order_by("id").all():
...     print user.name

it's result set is also a list, so you could use it just like
db.query. and there is not the mail list of sqlalchemy, so you
probably not get responses here.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to