= DAYOFMONTH(CURDATE()) ORDER BY MONTH(Datum), DAYOFMONTH(Datum) ASC"); while ($list1 = mysql_fetch_object($query1)) { $unixtime = strtotime($list1->Datum); $item = "  $list1->Item"; echo "".date("d-m",$unixtime)."$item
"; } $query2 = mysql_query("SELECT * FROM agenda WHERE MONTH(Datum) > MONTH(CURDATE()) ORDER BY MONTH(Datum), DAYOFMONTH(Datum) ASC"); while ($list2 = mysql_fetch_object($query2)) { $unixtime = strtotime($list2->Datum); $item = "  $list2->Item"; echo "".date("d-m",$unixtime)."$item
"; } $query3 = mysql_query("SELECT * FROM agenda WHERE MONTH(Datum) < MONTH(CURDATE()) ORDER BY MONTH(Datum), DAYOFMONTH(Datum) ASC"); while ($list3 = mysql_fetch_object($query3)) { $unixtime = strtotime($list3->Datum); $item = "  $list3->Item"; echo "".date("d-m",$unixtime)."$item
"; } $query4 = mysql_query("SELECT * FROM agenda WHERE MONTH(Datum) = MONTH(CURDATE()) AND DAYOFMONTH(Datum) < DAYOFMONTH(CURDATE()) ORDER BY MONTH(Datum), DAYOFMONTH(Datum) ASC"); while ($list4 = mysql_fetch_object($query4)) { $unixtime = strtotime($list4->Datum); $item = "  $list4->Item"; echo "".date("d-m",$unixtime)."$item
"; } ?>