updated the pages table in the database