Lessee...
I have an n-record table and I need the last 10. I presume they're not sorted in any way.
First I find out what n is, then I make my query, offsetting it sufficiently that only the last 10 are found. The offset I want is the number of records minus 10.
Assuming $n is already equal to the number of records I set
$m=$n-10;
"select * from table [where stuff] offset $m"
This assumes that "offset" is understood by your dbms.