family_tbl id (INT) PK name (VARCHAR) location (VARCHAR) person_tbl id (INT) PK name (VARCHAR) family_id (INT) FK apple_tbl id (INT) PK location (VARCHAR) grapes_tbl id (INT) PK location (VARCHAR) banana_tbl id (INT) PK location (VARCHAR)
What I am trying to do is make a query that will give me:
person_tbl.name, family_tbl.name, apple_tbl.location, grapes_tbl.location, banana_tbl.location
What I am doing right now is I have a loop with 4 embedded mysql queries and when I do this for a table that has around 13,000 records and growing, it is very slow...
The example above is probably a pretty bad design but just trying to get the idea here if I use an embedded query, joins or group by's to do what I need. Any ideas here?
Thanks.

New Topic/Question
Reply


MultiQuote





|