I want to order my posts from mysql. Newest at first.
Whit this code working fine, but oldest posts at first place
$sql = "SELECT * FROM post LIMIT $offset, $no_of_records_per_page";
I tried with this codes and i got an error " mysqli_fetch_object() expects parameter 1 to be mysqli_result, bool given"
$sql = "SELECT * FROM post LIMIT $offset, $no_of_records_per_page DESC";
or
$sql = "SELECT * FROM post LIMIT $offset, $no_of_records_per_page ORDER BY date DESC";
Im using pagination. How can i slove this?