I asked a question yesterday and the answer I got has answered the first part of my problem - I now have a query that generates a list similar to this:
fname, sname, uname, assignment, task, grade
joe, blogs, joe.blogs, 1, 1, 52
joe, blogs, joe.blogs, 1, 2, 58
jim, blogs, jim.blogs, 1, 1, 95
jim, blogs, jim.blogs, 1, 2, 86
amy, blogs, amy.blogs, 1, 1, NULL
amy, blogs, amy.blogs, 1, 2, 76
an so on. It takes the most recent grade from the list and still works where a student hasn't received a grade for task.
What I want next is to produce a table that looks similar to this:
| Assignment 1 | Assignment 2 |
Name |-----------------|-----------------|
| Task 1 | Task 2 | Task 1 | Task 2 |
===========================================
Joe.. | 52 | 58 | .. | .. |
Jim.. | 95 | 86 | .. | .. |
Amy.. | U | 76 | .. | .. |
...
again, I've done similar things before, but I know they were horribly inefficient - Ideally I'd like to be able to produce this table with a single pass of the array.
Thanks.