That limit statement doesn't look like it will do what you want, instead of using LIMIT in the recordset, use a loop to move the pointer to the last record, then move previous to move one back, then write the record to the page:
<?php
while(!$RecordsetName->atEnd()) {
$RecordsetName->moveNext();
}
$RecordsetName->movePrevious();
echo($RecordsetName->getColumnVal("ColumnName"));
?>