用ora如何接收oracle存储过程的多行返回(返回数据集)
jay79 2004-03-23 03:14:51 从php调用oracle的存储过程,有输入和输出。
现在输出的是数据集(多行),php如何获得多行?
用的数据库接口函数是php里面的ora函数库
单个数据输出可以的(Pl_M_INFO 是返回单个数据的)
ora_parse($cursor, "begin Pl_M_INFO (:i_qqnum,:i_flag,:i_info,:o_flag); end;");
$i_qqnum='3004';
$i_flag='1';
$i_info='111111';
$o_flag='';
ora_bind($cursor, "i_num", ":i_num", 32, 1);
ora_bind($cursor, "i_flag", ":i_flag", 32, 1);
ora_bind($cursor, "i_info", ":i_info", 32, 1);
//输出参数
ora_bind($cursor, "o_flag", ":o_flag", 32, 2);
Ora_Exec ($cursor);
echo "The Ruturn o_flag:".$o_flag."\n";