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:
2011-10-01
2011-10-01
2011-10-01
something here..
2011-10-02
2011-10-02
something here..
2011-10-03
something here..
in my database some previous date got a lot duplicate date and some are only one record, so I need to sort it for make my interface more clear
here is my code(but it’s not work):
$Current = date("Y-m-d" ,strtotime("now"));
$query= mysql_query("SELECT date FROM staff WHERE date < '$Current'");
while($res=mysql_fetch_array($query)){
echo $res['date'];
echo "something here";
}
thanks
Can’t you simply use this?
or (if you need only different dates)