This topic is locked

Advanced select query

6/18/2007 4:57:08 AM
PHPRunner General questions
M
michael_l author

Hi All,
In PHPRunner; How can I select values from Parent of Parent?
3 Tables A,B,C
A and B have master-detail relation. (A_ID, B_AID)
B and C have master-detail relation. (B_ID, C_BID)
I want to get the A value (A_ID) of C record (C_ID), How can I get it? And how can I select all values from C which have same A value?
Any Suggestion?
Michael Luke,

J
Jane 6/18/2007

Michael,
you can do it editing your query on the Edit SQL query tab. Use INNER JOIN clause:

select

`A`.`FieldNameA`,

`B`.`FieldNameB`,

`C`.`FieldNameC`

from `A` INNER JOIN `B` on (`A`.`A_ID`=`B`.`B_AID`)

INNER JOIN `C` on (`B`.`B_ID`=`C`.`C_BID`)

M
michael_l author 6/18/2007

Jane,
Good to hear from you,
I am stuck at Lookup wizard,
I am in C table and I need to get A value which all C values share same A value.
Michael,