I have table dates
as following
"dates" "one" "two" "three" "four"
date1 id1 id2 id3 id4
date2 id3 id1 id4 id2
and a second table id2name
"ids" "names"
id1 name1
id2 name2
id3 name3
id4 name4
I have a mental block trying to write
SELECT * FROM dates WHERE `date`='$date' LEFT JOIN `id2name` ON ...
What clause do I put in ON to get names instead of IDs?