How do I get the last 10 rows of a table so that I can display them?
Postgres : use the pg_numrows($result) to get the number of rows (same exists for mysql I suppose) and then count back from that figure.
Mind: pg_numrows - 1 is the last record!
For mysql Try:
$query=SELECT * FROM table ORDER BY id DESC limit 10;
I think that would work.
Anna