Oh sorry, I overlooked the max part in your SQL statement because I didn't know it was a command.
My SQL is :
$result = mysql_query ("SELECT * FROM Actual_Hourly_2004, Stations WHERE (Actual_Hourly_2004.FMFP_ID=Stations.FMFP_ID) AND (Date_Valid > current_date - interval 2 day) AND (Stations.Forecast LIKE 'y') ORDER by 'Date_Valid', 'Time_Valid' DESC,'Grp','Pos'");
Technically I don't need to sort by Date_Valid because the interval of one day only return that day's records.
So how do I set this up?
$result = mysql_query ("SELECT *, max(Time_Valid) FROM Actual_Hourly_2004, Stations WHERE (Actual_Hourly_2004.FMFP_ID=Stations.FMFP_ID) AND (Date_Valid > current_date - interval 2 day) AND (Stations.Forecast LIKE 'y') ORDER by 'Date_Valid', 'Time_Valid' DESC,'Grp','Pos'");
edit - I put 2 days in there because I am just testing and have no data from today in the db. That command above returns no records though.