added order by date in ajax.php