left join limit 1
I have 3 tables, one main table, and two tables that reference the first
table. the two reference tables may have more than one entry to the first
one. I am able to use left joins to see all the data for the three tables,
however, for a specific purpose, i only want to see the first instance of
the 2 joined tables. Is there a way to do SELECT DISTINCT, but only have it
distinct on the columns from the first table, or do a subquery to get the
other two tables, using LIMIT 1. I'm using mysql 3.26. If this limits me
in any way, let me know what i can do w/ 4.1 or 5.0. thank you.
|