You can use select to do basic implicit joins by passing it a list of
tables, but for anything more complicated, and you should use
db.query.

For example:

db.select(['table1', 'table2'], where='table1.id = table2.table1id')

Thats creates this sql:
SELECT * FROM table1, table2 WHERE table1.id = table2.table1id

-Justin

On May 1, 4:02 am, "paul jobs" <[EMAIL PROTECTED]> wrote:
> join query:
>                         feeds=db.query('select feeds.*,users.profilepic from
> feeds* join users on feeds.userid=users.id *where userid in (select
> friend_id from friends where myid=$userid) order by id desc limit
> 20',vars=locals())
>
> select query:        feeds=db.select('feeds',where='id=$i.id',vars=locals())
>
> is there a way to use joins with db.select
>
> thanks for any help
>
> Paul
--~--~---------~--~----~------------~-------~--~----~
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