Hi Mike,
Thanks heaps for that. I modified:
users = join(user_view, recent_users,
user_view.c.id==recent_users.c.user_id
).select().execute().fetchall()
to:
users = session.execute(join(user_view, recent_users,
user_view.c.id==recent_users.c.user_id
).select()).fetchall()
and it worked a treat !
Cheers, Andrew.
On Feb 6, 4:12 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
> a SQL expression object needs to be bound to an engine if you'd like
> to say expression.execute(). otherwise you need to execute it in the
> context of an Engine, Connection, or a Session which is bound, such as
> engine.execute(expr), connection.execute(expr),
> session.execute(expr). detail on expicit/implicit execution is
> here: http://www.sqlalchemy.org/docs/04/
> dbengine.html#dbengine_implicit , executing with a Session is here:
> http://www.sqlalchemy.org/docs/04/session.html#unitofwork_sql
>
> hope this helps !
>
> - mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---