Link to home
Create AccountLog in
Avatar of Richardetal
RichardetalFlag for United States of America

asked on

Calling AS400 Stored Procedure from PHP with ODBC

I have a stored procedure GETSTORES(#####) which requires a five digit account number and returns all stores for that account.  I need to call that stored procedure from php using an ODBC connection.  I can connect to the 400 and query directly but want to use the stored procedure to cut down on traffic.

I can't seem to find anything that works.
Avatar of Member_2_276102
Member_2_276102

I can't seem to find anything that works.

What goes wrong? Is there an error message?

What platform is PHP running on? What i5/OS version is running?

Can you show us a sample of your PHP coding?

Tom
Avatar of Richardetal

ASKER

iSeries is V5R4
PHP 5.3.1

I'm really at the point of trying to figure out how to construct the command in php.  I've found examples like:
$result=runStoredProc("exec GETSTORES(1550)");  

where GETSTORES(#) is the name of my stored procedure.  

runStoredProc is not recognized.

I'm just not sure how to do it...
ASKER CERTIFIED SOLUTION
Avatar of Richardetal
Richardetal
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account