× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Tom,

Where is the FROM command in your SQL statement?

$query = "select SDPROJ SDDESC from icsrvlib.xxxsp10p";
^^^^

-Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom Deskevich
Sent: Wednesday, September 16, 2009 9:29 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: I5_ and db2_ not working.

I am attempting to query a file on the as/400 via a php script with SQL.
The
db2 commands are not working. I tried to reference the path to the
i5toolkit_library in my php script. The browser does not show me
anything if
I do that. If you key db2_ and get the code completer up, does that mean
it
can find the commands?
I see the toolkit on my tree. I have a drive mapped to htdocs. My php
script
is saved under www/zend/htdocs/zendframeworkexamples. I can run other
PHP
scripts that do not access the i5 ok that are on the same path.
The zend subsystem is up and running.

ZEND QSYS SBS .0 DEQW
I5_COMD QTCP BCH .0 PGM-EASYCOMD TIMW
ZC_STR_PRN ZENDADMIN BCI .0 PGM-prngd SELW
ZENDCOREAP ZENDADMIN BCI .0 PGM-httpd SELW

Is i5_comd what executes the toolkit class commands on the as/400
(assuming
i5_comd)?
Do not see anything under the job log for that.

Here is some of the php code:

$i5link = db2_connect("infsyse","xtld90083","******") or die("failed to
connect to database");
$query = "select SDPROJ SDDESC icsrvlib.xxxsp10p";
$stmt = db2_prepare($i5link,$query) or die("<p>Failed to prepare SQL
statement</p>");
$result = db2_execute($stmt) or die("<p>Failed to execute SQL
statement</p>");

Replaced pw with *****, I have tried hard coding and using variables for
parms.

Not sure if this is the right forum, but could not find any others that
match. Thanks!


Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.