How can i extract the most recent and last entered bit of data from the below returned results, or how can i modify this statement to only bring back the most last enetered row?
Php/Mysql
$sql = "select booked.*, rooms.RoomName, rooms.GuardianId from booked LEFT JOIN rooms
ON booked.RoomsId = rooms.RoomsId
WHERE booked.WhoId = '$EmployeeId' AND booked.BookedDate = '$ReturnDate' and BookedTime = '$TimesAM' ";
$sql = "select booked.*, rooms.RoomName, rooms.GuardianId from booked LEFT JOIN rooms
ON booked.RoomsId = rooms.RoomsId
WHERE booked.WhoId = '$EmployeeId' AND booked.BookedDate = '$ReturnDate' and BookedTime = '$TimesAM' order by BookedTime DESC LIMIT 1";