What I want to ask is how to select from database record and my php code able to sort previous date by date,which is what i want to display in my interface:
("SELECT count(*), date FROM staff WHERE date < '$Current' GROUP BY date ORDER BY date asc");
Group them up with a count, you can then write out each date the number of times indicated by the count, then write out your additional value.