One obvious approach would be to query the action items and then run two queries for each action item to pull the two separate related child items. Then just join then in php for output. But that would always mean 2*actions+1 queries every time the page would be viewed. That's a lot of database connections.
Another approach is to use a join query on the parent and one child. Then run a query for each action to pull the other child data. Again joining the data together in php for output. But this means a lot of redundant parent data due to the one to many join.
I'm sure there would be a third approach to do it all in one query with lots of redundant data, but I haven't sat down with my brain yet (it's out to lunch) to talk about that approach. I'm thinking this one may be the best for performance even though a lot more data would need to be transfered.
Any other ideas or suggestions on optimizing these approaches? Thanks.
-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]