Pregunta

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'";

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top