|
On Aug 11, 2017, at 5:20 PM, Jason Aleksi <jason.aleski@xxxxxxxxx> wrote:
I was wondering if someone could point me in a direction regarding a
db2_prepare statement. In my connection options, I specify a library list.
However, with or without the library list, I still have to fully qualify
the database name in the query. Otherwise, I get a db2_prepare():
Statement Prepare Failed in error.
$database['options'] = array('i5_libl' => 'CUSLIB',
'i5_naming' => 'DB2_I5_NAMING_ON'
);
$conn = db2_connect($database['server'],
$database['username'],
$database['password'],
$database['options']
);
if($conn){
print 'Connection successful.';
$params = array('123456789', 'MYLASTNAME');
$query = "SELECT count(*) FROM CUSLIB.CUSLOC WHERE locid = ? AND
lastname = ?";
$stmt = db2_prepare($conn, $query);
}else{
print 'Connection failed.';
}
Should I not be able to just use the library list without fully qualifying
the database in the SQL statement?
-JA-
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.