holty
11-24-2003, 08:28 AM
I have wrote my oracle stored procedure and it works fine...
I just need to be able to call it and return its results in php.
here is my code - I'm having a few probs
<?php
$conn = OCILogon("user","pass","db");
$stmt = OCIParse($conn,"begin sp_customerdata(2,'UK'); end;");
OCIExecute($stmt);
while (OCIFetchInto($stmt, &$arrCustomer, OCI_ASSOC+OCI_RETURN_NULLS))
{
?>
<tr>
<td>
<?= $arrCustomer['Customer_ID'] ?>
</td>
<td>
<?= $arrCustomer['Start_Date'] ?>
</td>
<td>
<?= $arrCustomer['End_Date'] ?>
</td>
</tr>
<?php }
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
</table>
I get this error:
Warning: ocifetchinto(): OCIFetchInto: ORA-24374: define not done before fetch or execute and fetch
on this line:
while (OCIFetchInto($stmt, &$arrCustomer, OCI_ASSOC+OCI_RETURN_NULLS))
Any ideas?
I just need to be able to call it and return its results in php.
here is my code - I'm having a few probs
<?php
$conn = OCILogon("user","pass","db");
$stmt = OCIParse($conn,"begin sp_customerdata(2,'UK'); end;");
OCIExecute($stmt);
while (OCIFetchInto($stmt, &$arrCustomer, OCI_ASSOC+OCI_RETURN_NULLS))
{
?>
<tr>
<td>
<?= $arrCustomer['Customer_ID'] ?>
</td>
<td>
<?= $arrCustomer['Start_Date'] ?>
</td>
<td>
<?= $arrCustomer['End_Date'] ?>
</td>
</tr>
<?php }
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
</table>
I get this error:
Warning: ocifetchinto(): OCIFetchInto: ORA-24374: define not done before fetch or execute and fetch
on this line:
while (OCIFetchInto($stmt, &$arrCustomer, OCI_ASSOC+OCI_RETURN_NULLS))
Any ideas?