Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Transaction Patterns » List2 with multiple parent relations to the same table
Re: List2 with multiple parent relations to the same table [message #1774 is a reply to message #1773] Wed, 29 October 2008 15:35 Go to previous messageGo to previous message
ikatz is currently offline  ikatz
Messages: 40
Registered: December 2007
Location: Durham, NH
Member
It looks like the LIST2 is not getting the owner_organization_id either; the screen shows all the records from the vehicle table, not simply those associated with the selected organization.

Outer SQL:
SELECT SQL_CALC_FOUND_ROWS 
    organization.*, 
    parent_organization.name as parent_organization_name 
FROM organization  
    LEFT JOIN organization AS parent_organization 
        ON (parent_organization.organization_id=organization.parent_organization_id)
WHERE ( organization.organization_id='2' )    
ORDER BY organization.name asc
LIMIT 1 
OFFSET 0

Inner SQL:
SELECT SQL_CALC_FOUND_ROWS 
    vehicle.*, 
    manuf_organization.name AS organization_name, 
    owner_organization.name AS owner_organization_name, 
    operator_organization.name AS operator_organization_name 
FROM vehicle 
    LEFT JOIN organization AS manuf_organization 
        ON (manuf_organization.organization_id=vehicle.manuf_organization_id)  
    LEFT JOIN organization AS owner_organization 
        ON (owner_organization.organization_id=vehicle.owner_organization_id)  
    LEFT JOIN organization AS operator_organization 
        ON (operator_organization.organization_id=vehicle.operator_organization_id)      
LIMIT 25 
OFFSET 0


Where does the inner sql statement of vehicle(list2) get the owner_organization_id field from -- the outer sql statement of vehicle(list2), or the data posted from organization(list1)?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Previous Topic: hyperlink in list or detail or tree form
Next Topic: PDF Report
Goto Forum:
  


Current Time: Thu Apr 25 16:38:36 EDT 2024

Total time taken to generate the page: 0.00959 seconds