I'm trying to do the following:
Select all rows from table 1 and make a join on table 2 to search for two rows.
I can already achieve something like this:
SELECT * FROM voices LEFT JOIN files ON (voices.picture=files.id OR voices.defaultsample=files.id);
Each record found in voices can have up to 2 rows in the files table, one for the picture and one for the defaultsample.
But the statement above returns me two rows as result. I would to have the query return one row containing all queried fields, not two.
Or is there no other way but to split it up into 2 queries? One query that joins on picture and another that joins on defaultsample?
Any advice is mostly appreciated.