Jump to content

Recommended Posts

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
)

.................

  • 4 weeks later...

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>";

}

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.