I have a oracle/php aplication , and need to collect some values inside a for loop. and pass these variables inside session variables. How can i do it? can i keep all the random values passed inside a single session variable?
this is my code:
$db_conn = ocilogon("xx", "xx", "xx");
$cmdstr = "SELECT o.COD, o.SIS, o.CLI, ".
"o.COD_TRANS, f.COD, f.SIS, ".
"FROM SCA o, FUNC f ".
"WHERE o.SIS = 'SIS' ".
"AND o.CLI = '$org' ".
"AND o.COD = '$user' ".
"AND o.SIS = f.SIS ".
"AND o.COD = f.COD";
$parsed = ociparse($db_conn, $cmdstr);
ociexecute($parsed);
$nrows = ocifetchstatement($parsed, $results);
for ($i = 0; $i < $nrows; $i++ ) {
$SESSION[name] = $results['NAME_OPER'][$i];
$SESSION[cod] = $results['COD'][$i];
$teste = array($results['COD_TRANS'][$i]);
$_SESSION[cod_trans] = array($results['COD_TRANS'][$i]);
}
OCIFreeStatement($parsed);
OCILogoff($db_conn);
I may have one or six values inside this variable wich is the one i need in other file .....