PHP Scripts to analyse a MySQL or Postgres Database