for user in session.query(User).filter("id<224").order_by("id").all():
...     print user.name


python code.py
Traceback (most recent call last):
 File "code.py", line 21, in <module>
   max_overflow = 5
 File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/__init__.py", line
160, in create_engine
   return strategy.create(*args, **kwargs)
 File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/strategies.py",
line 48, in create
   dialect_cls = u.get_dialect()
AttributeError: 'tuple' object has no attribute 'get_dialect'

On Thu, Jul 10, 2008 at 9:41 PM, Chen Memo <[EMAIL PROTECTED]> wrote:
>
> 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