mishuk Posted March 20, 2007 Share Posted March 20, 2007 Hi I have used the code below and so far works as it should. However i would further like to place the results into a simple table and was wondering whats the best way of doing this? Tahanks output example Column 1 Column2 Column 3 ...... values values value ....... $curs = OCINewCursor($conn); $stmt = OCIParse($conn,"begin p_all_houses(_ten_type, _recordset); end;"); OCIBindByName($stmt,"_ten_type",&$tenant,32); OCIBindByName($stmt,"_recordset",&$curs,10,OCI_B_CURSOR); ociexecute($stmt); ociexecute($curs); while (OCIFetchInto($curs,&$p_recordset)) { echo "<pre>"; print_r($p_recordset ); echo "</pre>"; } Produces this Array ( [0] => 6 [1] => 2 [2] => 4 Sevensea Avenue [4] => Sheffield [5] => S4 5JS [6] => family [7] => detached [8] => 0 ) ................. Quote Link to comment https://forums.phpfreaks.com/topic/43510-php-and-stored-procedure-mulit-row-return/ Share on other sites More sharing options...
gluck Posted April 13, 2007 Share Posted April 13, 2007 I guess by Table you mean HTML Table? Use something like this <table> <? for ($i=0;$i<count($p_recordset);$i++) {?> <tr> <td><?=$p_recordset?></td> </tr> <table> <?}?> while (OCIFetchInto($curs,&$p_recordset)) { echo "<pre>"; print_r($p_recordset ); echo "</pre>"; } Quote Link to comment https://forums.phpfreaks.com/topic/43510-php-and-stored-procedure-mulit-row-return/#findComment-228616 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.