You might find some pointers here for SQL Stored procedures and PHP at the
free webinar:


Office Phone: (708)233-5880 Cell: (408)679-1011

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Michael Ryan
Sent: Tuesday, February 05, 2013 6:06 AM
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] Calling i Function from PHP

I thought I could do this in PHP:

$Wk_Error = MSP_ValidateStoreFN($Wk_Store);

Where MSP_ValidateStoreFN is a function on the i. I'm getting this message
in php.log:

"PHP Fatal error: Call to undefined function MSP_ValidateStoreFN() in

I created the function with the Create Function SQL statement on the i.

Is this syntax not available, and I need to use db2_exec or db2_execute?

I believe I could use this function like this:
"Select * from StrMaster where MSP_ValidateStoreFN($Wk_Store) = 'Y';"
Is that correct?

This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at

This thread ...


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

This mailing list archive is Copyright 1997-2020 by 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].