Ok, as some of you may know I'm an Oracle newbie w/ PHP. I'd rather use
MySQL but at the office here we use Oracle and boy do I have alot to learn.
I'm starting to hate it after using MySQL!!
--------------------------------------------------------------------------
1) Is there a similar statement using PHP/Oracle functions as below for
MySQL?
--------------------------------------------------------------------------
while (list ($key, $val) = each ($HTTP_POST_VAR S)) {
print $key . " = " . $val . "<br>";
}
--------------------------------------------------------------------------
2) Should I be using something like this or is there easier way to pull data
into array?
--------------------------------------------------------------------------
// Start new Oracle cursor and query
$q = "select * from inventory";
$ora_cur = ora_do( $ora_conn, $q ) or die("Couldn't setup Oracle
Cursor");
if ( $ora_cur ) {
// Figure out how many columns
$numCols = ora_numcols( $ora_cur );
// Get the first fetched row and put it in to our array...
$row = array();
// Loop through columns
for( $i = 0; $i < $numCols; $i++ ){
array_push( $row, ora_getcolumn( $ora_cur, $i ) );
}
array_push( $results, $row );
// Fetch rows, one at a time, putting them in their own
// array. Each row should be appended to the array of
// results..
// Get each row
while ( ora_fetch( $ora_cur ) ){
$row = array();
// Loop through columns
for( $i = 0; $i < $numCols; $i++ ){
array_push( $row, ora_getcolumn( $ora_cur, $i ) );
}
array_push( $results, $row );
}
}
while (list ($results, $row) = each ($HTTP_GET_VARS )) {
print $results. " = " . $row . "<br>";
}
?>
--------------------------------------------------------------------------
3) For some reason my html below does not get displayed on the page. After
I submit the page is blank and just says database connected succesfully.
Why is it stopping here??
--------------------------------------------------------------------------
<html><head><ti tle>etc...<body >etc...
MySQL but at the office here we use Oracle and boy do I have alot to learn.
I'm starting to hate it after using MySQL!!
--------------------------------------------------------------------------
1) Is there a similar statement using PHP/Oracle functions as below for
MySQL?
--------------------------------------------------------------------------
while (list ($key, $val) = each ($HTTP_POST_VAR S)) {
print $key . " = " . $val . "<br>";
}
--------------------------------------------------------------------------
2) Should I be using something like this or is there easier way to pull data
into array?
--------------------------------------------------------------------------
// Start new Oracle cursor and query
$q = "select * from inventory";
$ora_cur = ora_do( $ora_conn, $q ) or die("Couldn't setup Oracle
Cursor");
if ( $ora_cur ) {
// Figure out how many columns
$numCols = ora_numcols( $ora_cur );
// Get the first fetched row and put it in to our array...
$row = array();
// Loop through columns
for( $i = 0; $i < $numCols; $i++ ){
array_push( $row, ora_getcolumn( $ora_cur, $i ) );
}
array_push( $results, $row );
// Fetch rows, one at a time, putting them in their own
// array. Each row should be appended to the array of
// results..
// Get each row
while ( ora_fetch( $ora_cur ) ){
$row = array();
// Loop through columns
for( $i = 0; $i < $numCols; $i++ ){
array_push( $row, ora_getcolumn( $ora_cur, $i ) );
}
array_push( $results, $row );
}
}
while (list ($results, $row) = each ($HTTP_GET_VARS )) {
print $results. " = " . $row . "<br>";
}
?>
--------------------------------------------------------------------------
3) For some reason my html below does not get displayed on the page. After
I submit the page is blank and just says database connected succesfully.
Why is it stopping here??
--------------------------------------------------------------------------
<html><head><ti tle>etc...<body >etc...
Comment