How to specify capitalization for column names in pg_fetch_object?
David McMath <[email protected]> Mon, 19 Nov 2012 10:45:49 -0600
| Newsgroups | gmane.comp.db.postgresql.php |
|---|---|
| Message-ID | <[email protected]> |
Dear List, I'm converting a PHP project from using Oracle to using Postgres. Apparently, pg_fetch_object() wants to create an object with field names lowercase by default. In the Oracle analogue, they're uppercase. So all my code's "$obj->FIELD" references need to change to "$obj->field". Is there any way to tell PHP or Postgres to change the default capitalization? In Perl, I'd use DBI and set FetchHashKeyName to "NAME_uc". In PHP, we're using "DB" (not MDB2) for the database connections, and I don't see a similar-looking lever to pull on Any advice is appreciated, dave -- Sent via pgsql-php mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-php