I would like to show the last 10 results found in a table, but with ASC ordering. I'm using the following:
$listarResultados = $pdo->prepare("SELECT * FROM teste WHERE categoria = 'cateste' ORDER BY id ASC LIMIT 10"); $listarResultados ->execute();
It turns out that this select returns me the first 10 results, and I want to list the last 10 but in ASC order. What is the right way to do this?