wHATS wrong with max function
Posted: Tue Sep 28, 2004 7:06 pm
I tried using the following sql statement to get the maximum value from the record. But it doesnt seems to be working.
Code: Select all
$sql= " select MAX(loan_id) from loans";
$statement = OCIParse($connection, $sql) or die("error in sql statement<br>");
OCIExecute($statement) or die("error executing sql statement<br>");
echo OCIResult($statement, 'loan_id');
OCICommit ($connection);
OCILogoff($connection);