Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-10-11T19:33:54Z by 9B74_Craig_Jacquez
SystemAdmin
SystemAdmin
1731 Posts
ACCEPTED ANSWER

Pinned topic Manipulating library list

‏2007-05-14T08:42:02Z |
Hi,

I am implementing a DB2 driver for our PHP-framework but I have a problem setting the library list. I want to do queries like 'SELECT * FROM <tablename>' so without having to add the library name in front of the tablename. As we use 2 or 3 libraries for 1 application I need to set the librarylist to search these 3 libraries - however, I can't figure out how to do this.

In db2_connect you can pass the i5_lib options to set the default library. I found at other forums that you can add more than one library by passing array("i5_lib"=>"foo","i5_lib"=>"bar"), but this doesn't seem to work (only last library is accessible).

I tried to set the librarylist using i5_command() calls, however, once the librarylist is set and I connect and query using db2_ commands it seems to completely ignore the librarylist I set using i5_command's.

Summary: How can I set multiple libraries using PHP?

Any answer is highly appriciated. I'm an experienced PHP programmer but I am really new to DB2 and I5.

Harrie Verveer
  • 9B74_Craig_Jacquez
    9B74_Craig_Jacquez
    1 Post
    ACCEPTED ANSWER

    Re: Manipulating library list

    ‏2013-10-11T19:33:54Z  in response to SystemAdmin

    IBM i  Zendsvr 6.1.0 (PHP 5.4) - Please note the db2 i5_libl "library list option" also requires the i5_naming option "enabled":

    array('i5_libl' => 'LIB1 LIB2 LIB3', 'i5_naming' => DB2_I5_NAMING_ON);