We are creating a new system written in PHP on our iSeries linked to the DB2 database, based on one of our websites that was written for a MySQL database where the SQL access was all done using PDO.
Since we have a database object and all the required methods already existing, it seems logical (to us) that we should retain PDO for this new system.
However, even though we have been able to access DB2 files using PDO, we haven't found a way to set the default schema, which is very frustrating.
Most of our files are in one schema, which will change between live and test databases. Currently the only way we can access data is to add the schema to all SQL statements, which is very frustrating.
Is there a way to define a default schema at connection time like there is using DB2_connect?
Since we have a database object and all the required methods already existing, it seems logical (to us) that we should retain PDO for this new system.
However, even though we have been able to access DB2 files using PDO, we haven't found a way to set the default schema, which is very frustrating.
Most of our files are in one schema, which will change between live and test databases. Currently the only way we can access data is to add the schema to all SQL statements, which is very frustrating.
Is there a way to define a default schema at connection time like there is using DB2_connect?
Comment