I asked this on the mysql list, but nobody seemed to have a working solution:
Ok, I've been battling this SELECT statement for the better part of the day.
The SELECT statement is this:
SELECT DISTINCT request.id AS requestid, request.date, request.type, request.status,
faculty.f_name, faculty.l_name, action.id AS actionid, faculty.id AS facultyid FROM faculty, request, action WHERE request.id=action.request_id AND request.requested_by=faculty.id AND request.status=2;
And the results are :
http://www.geology.ohio-state.edu/test/rfatest/rfaadmin.php?closed=Closed
Now, if you look at the table, at the far left cell under RFA#, you'll notice that they are all the same (2). That is because there were 4 actions performed on RFA # 2. However, I only need for the column to be displayed once. When the user clicks under 'last action' then they can see all 4 actions. But for this table, I just need to show the data once.
So, could any kind soul help me out?
Thanks