Thread: PHP VS Oracle
View Single Post
 
Old June 8th, 2004, 07:35 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
Default

Hi,
I use Oracle8oci function, not DSN. So, what differences?

Attach code:
require_once("DB.php");
$connection = OCILogon ("prod","prod");
//build and issue query
$stmt = OCIParse($connection, "select * from bill where invno ='$_POST[invno]'");
$result = OCIExecute($stmt, OCI_DEFAULT);

** $rows = $result->numRows($result);**
should changed:
1. $row = OCIRowCount($stmt); OR
2. $row = OCIFetchStatement($stmt, $results, OCI_FETCHSTATEMENT_BY_ROW);

Then, next line how to change it?
** $row = $result->fetchRow(); **

Thanks in advance,
molly.