logo       

recommended approach for multiple table single result fetch: msg#00044

lang.perl.modules.dbi.rose-db-object

Subject: recommended approach for multiple table single result fetch


i need to do a join on 3 tables to retreive 1 or 0 items

table account
account_id is_verified
table email
id email_address account_id (references account.id)
table verification_string
id verification_string email_id (references email.id )

each table has its own rose class with the approriate references

in plain sql it would be:

SELECT *
FROM account , email , verification_string
WHERE
account.id = email. account_id AND
email.id = verification_string.id AND
email.email_address= %s AND
verification_string.verification_string= %s

can this be done trivially in rosedb using the table/class objects?
or should i just stick to raw sql -- which i'm fine with





| - - - - - - - - - - - - - - - - - - - -
| RoadSound.com / Indie-Rock.net
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - -


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise