Re: call informix sp using PHP3 in this way,right?
Posted in 2000
Harrison
You dont need the into result in the value of $sql3. The resultset will contain
only one column and you will get it from $result = $row["result"].
Basically, the rule of thumb is that the query should run in dbaccess.
HTH
Sujit
Harrison Teng <harrison@sh.east.cn.net> on 03/21/2000 08:59:29 PM
Please respond to Harrison Teng <harrison@sh.east.cn.net>
To: informix-list@iiug.org
cc:
Subject: call informix sp using PHP3 in this way,right?
Hi, All:
I am the beginner of Informix and PHP3
Now I want to use Sotred Procedure in PHP3
File, I write it in the following way, Is it Right? Please Help me
<?
$sql3="EXECURE PROCEDURE
addcashcheque($user_id,'$order_id',$cheque,'$invoice_no','$location',$euid,$
cash,$cheque) INTO :result ";
$result3=ifx_query($sql3,$connection);
if (! $result3)
{
printf("Can't select orders : %s\\n<br>%s<br>\\n", ifx_error());
ifx_errormsg();
die;
}
$row = ifx_fetch_row ($result3, "NEXT");
while (is_array($row))
{
for(reset($row); $fieldname=key($row); next($row))
{
$fieldvalue = $row[$fieldname];
$result = $row["result"];
}
$row = ifx_fetch_row ($result3, "NEXT");
}
ifx_free_result ($result3);
if ($result=-1)
{ echo "error money"; exit;}
?>
Looking forward your help. :-))
Thank you all
Thank you in advance .
2000.03.22