I'm trying to run some SQL in Oracle that returns a single value...
$sql_getID = "SELECT max(CUSTID_NUM) from cfull2.tbl_dl_customers";
how the hell do I get that number into a variable?
I've tried a dozen different things, but the documentation is so sparse and
it's all about getting rows of data...
$stmt_getID = OCIParse ( $connection , $sql_getID );
OCIExecute ( $stmt_getID , OCI_DEFAULT );
$Max_ID = 1;
echo "Max_ID (check1) = $Max_ID <br />\n"; //echoes 1
while (OCIFetchInto($stmt_getID, $row, OCI_ASSOC)) {
$Max_ID = $row[CUSTID_NUM];
echo "Max_ID (check2) = $Max_ID <br />\n"; //echoes
nothing
}
$Max_ID++;
echo "Max_ID (check3) = $Max_ID <br />\n"; // echoes 1
This WHILE statement is just the last thing I've tried... All I want to do
is put the result of the SQL line above in to a variable....
Thanks in advance all
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]