Postgres Select Ids Into Array Methods In Php