No doubt this is off topic ... I'm pretty sure it's an issue with
sqlite not web2py.  But maybe someone's run into it before so I guess
it doesn't hurt to ask.

I'm using sqlite bundled with web2py.  I have a "Team" table (each
record has name, phone, e-mail, ...), and a "DocReview" table with
three FK columns to people in Team.  The following query, which joins
all three FK references in DocReview with Team, returns ONE record
with ReviewType and ONE name.  I would expect ALL records - each with
ReviewType and THREE names.

rows=db((db.DocReview.ReviewType_id==db.ReviewType.id) &
(db.DocReview.ReviewSubmittedBy==db.Team.id) &
(db.DocReview.ReviewAssignedTo==db.Team.id) &
(db.DocReview.ReviewCompletedBy==db.Team.id))
.select(db.ReviewType.ReviewTypeName,
db.Team.LName)

This query, which joins only one of the FK references in DocReview
with Team, returns ALL records with ReviewType and one name (as
expected).

rows=db((db.DocReview.ReviewType_id==db.ReviewType.id) &
(db.DocReview.ReviewSubmittedBy==db.Team.id))
.select(db.ReviewType.ReviewTypeName,
db.Team.LName)

Any way to get the first query to work as intended?  Would it work
with another database - maybe PostgreSQL?

Any assistance is appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to