[Sqlrelay-discussion] Output Bind Curosr with stored procedures
Brought to you by:
mused
|
From: Sylvain G. <S.G...@fo...> - 2006-10-12 17:17:12
|
Hi,
I am trying to use sored procedures with output bind cursor.
Here's my code.
$con=3Dsqlrcon_alloc("hosr,"","sqltest","relay",0,1);
$cur=3Dsqlrcur_alloc($con);
sqlrcur_prepareQuery($cur,"begin =
PROCEDURES_PCK.P_GET_ARTICLELIBELLE_BY_REF(:refcentrale, :curseur); =
end;");
sqlrcur_inputBind($cur,"refcentrale","P8297734");
sqlrcur_defineOutputBindCursor($cur,"curseur");
sqlrcur_executeQuery($cur);
$bindcur=3Dsqlrcur_getOutputBindCursor($cur,"curseur");
sqlrcur_fetchFromBindCursor($bindcur);
var_dump($bindcur);
var_export(sqlrcur_rowCount($bindcur));
var_export(sqlrcur_totalRows($bindcur));
var_export(sqlrcur_colCount($bindcur));
# print fields from table
for ($i=3D0; $i<sqlrcur_rowCount($bindcur); $i++) {
for ($j=3D0; $j<sqlrcur_colCount($bindcur); $j++) {
echo sqlrcur_getField($bindcur,$i,$j);
echo ", ";
}
echo "\n";
}
My issue is that I receive a sqlRelay resources in bindCursor but there =
is no rows, no cols, etc...
I have tried the same thing with oci and it works so the procedure works =
well.
Can somebody helps me , PLEASEEE !! ;-)
Regards,
_____ =20
Sylvain Gourvil
D=E9partement e-merchant
D=E9veloppeur Php/MySQL/Oracle
|