send last row of database to template