× 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.



Hi Jon...how do I determine the error state? btw, I changed the code like
this and commented out the db2_bind_param for the returned value:

$SQLStmt = "SELECT * from cusmstp where NEWSYS.MSP_ValidateStoreFN(cast (?
as char (3) ) ) = '666'";
$prepare = db2_prepare($db2connection, $SQLStmt);
db2_bind_param($prepare, 1, "$Wk_Store", DB2_PARAM_IN);
//db2_bind_param($prepare, 2, "$Wk_Error", DB2_PARAM_OUT);
$stmt = db2_execute($prepare) or die("Failed SQL
Stmt:".$SQLStmt.":".db2_stmt_error().":".db2_stmt_errormsg());

And now I get this in php.log:

[06-Feb-2013 18:02:55 UTC] PHP Warning: db2_execute() [<a
href='function.db2-execute'>function.db2-execute</a>]: Value Not Bound in
/www/zendsvr/htdocs/myphp/mPOS/Data/mPosData.php on line 31
[06-Feb-2013 18:02:55 UTC] PHP Warning: db2_execute() [<a
href='function.db2-execute'>function.db2-execute</a>]: Binding Error 3 in
/www/zendsvr/htdocs/myphp/mPOS/Data/mPosData.php on line 31

When I uncomment it (make it active), I get this:

[06-Feb-2013 18:16:49 UTC] PHP Warning: db2_bind_param() [<a
href='function.db2-bind-param'>function.db2-bind-param</a>]: Describe Param
Failed in /www/zendsvr/htdocs/myphp/mPOS/Data/mPosData.php on line 29
[06-Feb-2013 18:16:49 UTC] PHP Warning: db2_execute() [<a
href='function.db2-execute'>function.db2-execute</a>]: Value Not Bound in
/www/zendsvr/htdocs/myphp/mPOS/Data/mPosData.php on line 30
[06-Feb-2013 18:16:49 UTC] PHP Warning: db2_execute() [<a
href='function.db2-execute'>function.db2-execute</a>]: Binding Error 3 in
/www/zendsvr/htdocs/myphp/mPOS/Data/mPosData.php on line 30

So I think that's telling me that I don't want to bind the result
parameter, right?

Thanks!


On Wed, Feb 6, 2013 at 1:10 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:


On Wed, 6 Feb 2013, at 12:42 PM, Michael Ryan <michaelrtr@xxxxxxxxx>
wrote:

Still on my 'figure out how to call an SQL UDF from PHP' trail of tears..

What is the DB2 error state etc. after the prepare and bind steps Michael?
That might provide a better idea of what is going on. Can't see anything
glaringly obvious.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com




--
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,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.