Wednesday, January 16, 2008

I'm stuck

So the printing out a line for each person is hard and I'm officially stuck, I used the MAX(time) method and that works for only the most recent obviously, so it only prints out "Christine was last seen at home at [maxtime]".
I tried a few other methods I think the LIMIT method could be a possibility but I wasn't able to incorporate it into my code.
I was thinking maybe there could be a way to have a query for each person to print out their max times but once again I'm not sure how to go about this, any ideas?

1 comment:

Lorcan Coyle said...

Post details here of the table and I might be able to help. You could return the MAX(time) for each username... i.e. do a SELECT query for each username - looping through a list of all usernames perhaps...