Problem with Oracle

From: Date: Tue, 30 Jan 2001 14:55:45 +0000
Subject: Problem with Oracle
Groups: php.windows 
Request: Send a blank email to php-windows+get-5269@lists.php.net to get a copy of this message
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 - jasendorf@lcounty.com 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.

« previous php.windows (#5269) next »