I have a query which pulls all the information from a table based on a couple of variables.
However I know that in the table it is possible for there to be more than one record for a certain item and I want to select only one record for this item based on the most recent insertion - how do I do this?
at the moment I have
$sql = "SELECT * FROM tblResults WHERE DateRef = $DateId AND CRef = $ConcesRef ORDER BY LoadedWhen DESC";
$getInfo = mysql_query($sql);
this creates a list of the contents of tblResults sorted by date with the most recent at the top, but I have multiple rows for one or two items - how do I form the SELECT part of the query to say limit the 'box' column so that only one item ref for 'box' is listed and it is the most recently entered one.......
TIA