Yes, you need to fetch the rows and columns out of the result set.
Take a look at anyone of the following:
db2_fetch_array()
db2_fetch_object()
db2_fetch_assoc()
db2_fetch_both()

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Tom Deskevich
Sent: Monday, April 12, 2010 4:01 PM
To: 'Web Enabling the AS400 / iSeries'
Subject: Re: [WEB400] Calling a stored procedure from PHP, Grizzly, what do you do with $result

DO you have to do something with $result to get the data 'out'?
Can you give me an example of showing your results on a page?

Thanks Tom

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Grizzly Malchow
Sent: Monday, April 12, 2010 4:43 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Calling a stored procedure from PHP, they can't
make this stuff any easier.

The following has always worked for me.

$result = db2_exec("call library.procedure()");
Or
$company = 01;
$name = 'Grizzly';
$sql = "call library.procedure($company,'$name')";
$result = db2_exec($sql);

I never got into the habit of defining parameters and binding them. I'm
sure there are benefits, but it seems like less work to me to just build
the sql statement as a string and use db2_exec.







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.