Hi, all : I have problem when I try to retrieval the data from Oracle database. what I want is to put each row of data into an array with second column value as the key and first column as the value, at present I can not append the value to the existing array instead replacing current array value, can any people how can I fix it , sorry I am pretty new to PHP, thank you in advance. Jeff
<html> <body> <?php putenv( "ORACLE_SID=TEST"); putenv( "ORACLE_HOME=c:\orant"); $conn = ora_logon("[EMAIL PROTECTED]", "test2"); $curs = ora_open($conn); ora_commitoff($conn); $query = "SELECT verification_days,verification_code FROM verification"; printf("%s", $query); ora_parse($curs, $query) or die; ora_exec($curs); $day_rules = array(); // if id is not null then we need to get information about desc while(ora_fetch($curs)) { $temp1= ora_getcolumn($curs,0); $temp2 = ora_getcolumn($curs,1); printf("%s\n",$temp1); printf("%s\n",$temp2); if ($temp1 !="") { // how can i fix in here???? $day_rules= array(ora_getcolumn($curs,1)=>ora_getcolumn($curs,0)); /* array_push(ora_getcolumn($curs,1)=>ora_getcolumn($curs,0));*/ } array_walk ($day_rules, 'test_print'); } print_r($day_rules); ora_close($curs); ora_logoff($conn); ?> </body> ********************************************************************** NOTICE - This communication contains information which is confidential and the copyright of Integral Energy Australia or a third party. If you are not the intended recipient of this communication please delete and destroy all copies and telephone Integral Energy on 131081 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Integral Energy. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Integral Energy. Except as required at law, Integral Energy does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or inference. ********************************************************************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php