Stores last page to the database.