View Full Version : need help in order by clause

10-19-2009, 08:54 AM
i want to select data from db order by date column and display the latest post first

$query = "SELECT * FROM jobs_uni limit $start, $per_page";
//echo $query;
$result = mysql_query($query);

how to do this?

i already use this way

$query = "SELECT * FROM jobs_uni limit $start, $per_page ORDER BY date DESC";


$query = "SELECT * FROM jobs_uni ORDER BY date DESC limit $start, $per_page";

both are not working

10-19-2009, 09:22 AM
Add proper errors checks on your query to reveal the etrors in it, like

$result=mysql_query($query) or die(mysql_error(). '<br><br>query : '.$query );