PHP and returned values from Informix stored procedures

PHP and returned values from Informix stored procedures

Post by Steve Wee » Fri, 07 Nov 2003 01:33:18


Does anyone know how to retrieve the values returned from an Informix Stored
procedure in PHP.

I have a procedure that returns 4 values but only 1 row. If I prepare it and
then execute it I can not retrieve the results as all of the PHP functions seem
to return an array based on the column names, wheras there is no column name
associated with the return values.

Alternatively is there any way to name the return values from a stored procedure.

Thanks to any Informix/PHP gurus





Steve Weet
XPosted to comp.lang.php
 
 
 

PHP and returned values from Informix stored procedures

Post by Paul Watso » Fri, 07 Nov 2003 02:02:15

Not particularly pretty, but this function retrieves the
values from the spl sp_mailsetup into $result, each elephant
of $result is then access via $result['[Expr_1]'] etc

$result=ifx_query("execute procedure sp_mailsetup('$ID')",$conn);
if($result)
{
$row=ifx_fetch_row($result,'NEXT');
print $result['[Expr_1]'];
print $result['[Expr_2]'];
}




--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #

 
 
 

PHP and returned values from Informix stored procedures

Post by Steve Wee » Fri, 07 Nov 2003 04:29:16

You Sir, are a star. Thank you
 
 
 

PHP and returned values from Informix stored procedures

Post by Obnoxio Th » Sat, 08 Nov 2003 01:09:25


He sir, are a disastar...



--
Ciao,
The Obnoxious One

"Ogni uomo mi guarda come se fossi una testa di cazzo"