I'm new to zend core i5/os, and not very expirenced on IBM iservers, so excuse me if I'm asking a stupid question.
I've PHP installed on our V5R4 server. I'm trying to make a simple query that despite being executed with 'STRSQL' on the OS side, it doesn't on PHP side.
So the query is:
Code: Select all
SELECT table2.key, table2.name FROM table1 LEFT OUTER JOIN table2 ON (table1.key = table2.key) WHERE table1.year = '2011' AND table1.weeknr = '15' GROUP BY table2.key, table2.name
Code: Select all
Error: Array | Error Message: 36001 | Error number: -243
Code: Select all
$i5_server_ip = "127.0.0.1";
$i5_uname = "username";
$i5_pass = "password";
$i5_database = "DATABASE";
$options = array(
I5_OPTIONS_JOBNAME => null,
I5_OPTIONS_SQLNAMING => 'SQL',
I5_OPTIONS_DECIMALPOINT => ',',
I5_OPTIONS_CODEPAGEFILE => null,
I5_OPTIONS_LOCALCP=>" UTF-8;ISO8859-1",
I5_OPTIONS_JOBNAME=>'5JOB',
I5_OPTIONS_INITLIBL => $i5_database);
/*$db2options = array(
'cursor' => DB2_SCROLLABLE
);*/
$conn = i5_connect($i5_server_ip, $i5_uname, $i5_pass, $options);
if ($conn === false) {
echo "APPLICATION PANIC: Failed to connect to server!!!<br/>";
die("Error: ".i5_error()." | Error Message: ".i5_errormsg()." | Error number:".i5_errno());
}
Code: Select all
$result=i5_query($query_string) or die ("Error: ".i5_error()." | Error Message: ".i5_errormsg()." | Error number: ".i5_errno());
Thanks in advance!