Вопрос

I'm currently working on a website and I have a table called appeals that I want to display the latest records from. What would the query be to do this? So instead of displaying first to last I want it to display last to first.

The current query I have is:

$query = "SELECT id,user,title,reason,appealdate,closed FROM appeals WHERE closed='0'";

Это было полезно?

Решение

Just revert an order with ORDER BY id DESC:

  SELECT id,user,title,reason,appealdate,closed
    FROM appeals
   WHERE closed='0'
ORDER BY id DESC
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top