Ugg.. stuck... I have a table with two columns that store different ID's from the same table. (firsttime and lasttime, below, store the timeID and I would like my result to display the associated timename)
(table1) entries: entryID, thedate, firsttime, lasttime
(table2) times: timeID, timename
please help me.
$result = $connector->query ("
SELECT *
FROM entries
INNER JOIN times ON entries.firsttime = times.timeID
INNER JOIN times ON entries.lasttime = times.timeID");
while ($row = $connector->fetchArray($result)){
//display the date - works fine
echo $row['thedate'];
//timename for the firsttime field
echo $row['timename'];
//timename for the lasttime field
echo $row['timename'];
}