Populating an array with database column
Posted: Tue Jul 13, 2004 11:22 am
I'm looking to populate an array in php with a column from my database for later use.
More specifically, I'm trying to make an array that will store all the ID's from a table in my database using an ORACLE database.
Here's what I've got so far, not sure why it's not working, but when I print back the values of the array they're all empty:
More specifically, I'm trying to make an array that will store all the ID's from a table in my database using an ORACLE database.
Here's what I've got so far, not sure why it's not working, but when I print back the values of the array they're all empty:
Code: Select all
$detailsID = OCIParse($connect, 'select DTL_ID from mgargano.events_dtl order by DTL_ID');
@OCIExecute($details, OCI_DEFAULT);
$arrID=array();
$i=0;
while(OCIFetchInto($detailsID, $arrIDTemp, OCI_ASSOC+OCI_RETURN_NULLS))
{
$arrID[$i]=$arrIDTemp['DTL_ID'];
$i++;
}