Thread: PHP VS Oracle
View Single Post
Old June 7th, 2004, 08:20 PM
junemo junemo is offline
Authorized User
Join Date: Apr 2004
Location: malacca, malacca, Malaysia.
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to junemo

Hi Dan,

I want change the Mysql dbase function to Oracle 8 function. So, how to change this code to Oracle 8?I know it begin with oci.

Attach code:

//query database
$query = "SELECT * FROM item WHERE no = '$no'";
$result = mysql_query($query, $connection)or die(mysql_error());
$rows = mysql_num_rows($result);

//display all entries

              for ( $i=0; $i<$rows; $i++ )
            $row =mysql_fetch_array($result);

          echo " <td class=text8Arial1><b>Line:&nbsp;$row[line]</td>";
              echo " <td class=text8Arial11>&nbsp;&nbsp;<b>Invoice No: $row[no]</td>";
              echo "</tr>";
              echo " <td class=text8Arial1><b>Pos</b></td>";
          echo " <td class=text8Arial1>&nbsp;<b>Stock</td>";
              echo " <td class=text8Arial1><b>&nbsp;&nbsp;QTY</b></td>";
              echo " <td class=text8Arial1><b>&nbsp;&nbsp;UOM</b></td>";
              echo " <td class=text8Arial1><b>&nbsp;&nbsp;Unit Price</b></td>";
              echo " <td class=text8Arial1><b>&nbsp;Amount</b></td>";
              echo " <td class=text8Arial1><b>&nbsp;Total</b></td>";
              echo "</tr>";

          echo " <td class=text8Arial1>$row[po1]</td>";
          echo " <td class=text8Arial>&nbsp;<TEXTAREA class=text8Arial11 name=\"stock1\" rows=5 cols=120>$row[stock1]</TEXTAREA></td>";
              echo " <td class=text8Arial1>&nbsp;&nbsp;$row[qty1]</td>";
              echo " <td class=text8Arial1>&nbsp;&nbsp;$row[uom1]</td>";
              echo " <td class=text8Arial1>&nbsp;&nbsp;$row[pri1]</td>";
              echo " <td class=text8Arial1>&nbsp;$row[amo1]</td>";
              echo " <td class=text8Arial1>&nbsp;$row[total]</td>";
              echo "</tr>";

Thanks in advance,