zeezack Posted April 17, 2008 Share Posted April 17, 2008 My code seems to bring up an error? Warning: ociexecute() [function.ociexecute]: ORA-00933: SQL command not properly ended in /usr/local/apache2/htdocs/robtest/feed16.php on line 808 SELECT ACTION_CODE ACTION_CODE,ACTION_LEVEL ACTION_LEVEL, ACTION_MASTER ACTION_MASTER FROM (SELECT alias.ACTION_CODE, alias.ACTION_LEVEL, alias.ACTION_MASTER, rownum r FROM ( SELECT ACTION_CODE,ACTION_LEVEL,ACTION_MASTER FROM ACTION_CODES ORDER BY ACTION_CODE ) alias WHERE rownum <= 4 ) WHERE r > 4 Quote Link to comment https://forums.phpfreaks.com/topic/101526-oracle-issue/ Share on other sites More sharing options...
zeezack Posted April 17, 2008 Author Share Posted April 17, 2008 but I can not seem to fetch the results.. why $numr=ociparse($c,$sql); ociexecute($numr); $check_num_records = ocinumcols($numr); echo''.$check_num_records.' - CHECK'; //pull out the number of records. echo'<br/>Results<br/>'; //if($check_num_records==0) //{ // echo'Currently, there is nothing in '.$k.'.',"\n"; //} //else // { OCISetPrefetch($numr, 100); while ($succ = OCIFetchInto($numr, $row)) { foreach ($row as $item) { echo $item." "; } echo "<br>\n"; } while ($row = ocifetchstatement($numr, &$arr)) { echo'BIG TEST WOOOOOO HOOO '.$row[0].'<br/>'; echo'BIG TEST WOOOOOO HOOO '.$arr[0].'<br/>'; if($sql_mode==1) { $real_results[$m]= $row; //place ONLY SQL mode 1 results from table into array } for($i=0;$i<=$n-1;$i++) { $trv.="'$row[$i]', "; // a,b,c, - this makes a string with the results for each coloumn it finds... col1, col2, col3, } $trv =substr($trv,0,-2); //remove the comma from the last variable $trv = "($trv)"; // (a,b,c) - these results are placed into this format then put into an array. $mass_result[] = $trv; unset($trv); } //} Quote Link to comment https://forums.phpfreaks.com/topic/101526-oracle-issue/#findComment-519468 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.