Hi there,
I have created a file called test.php In this
file I included a different file called connect.inc which contains the following code:
<?php
// for Oracle database connection
$DB_HOST = "hosp";
$DB_USER = "your_oracle_account_name";
$DB_PASS = "your_oracle_account_password";
<?
The test.php contains the following cod:
<?php
include("includes/connect.inc.php");
?>
<?
$sql = "SELECT STAFF_ENNAME, STAFF_ARNAME
FROM HR_STAFF_MAST
ORDER BY STAFF_ARNAME";
echo "<br>";
echo $sql;
echo "<br>";
// parse SQL statement
$sql_statement = OCIParse($sql)
or die("Couldn't parse statement.");
echo $sql_statement;
// execute SQL query
@OCIExecute($sql_statement)
or die("Couldn't execute statement.");
// get number of columns for use later
$num_columns = OCINumCols($sql_statement);
echo "<br>";
echo $num_columns;
?>
but, i'm getting the following error:
Warning: Wrong parameter count for ociparse() in c:\apache\htdocs\oraconn\test1.php on line 80
Couldn't parse statement.
My question is how to use PHP class to connect to oracle.
please advise
thanks
hass_79