Hi,
I have great trouble with 'select' clausule in PHP with Oracle (Oracle 734). I can make insert, update, delete, but i am not able to make select.
This is my code:
$conn=OCILogon("user","pwd","db");
if (!$conn) {
echo "Unable to connect: " . ora_error();
die();
}
else{
$sql = "select * from odysea.base01";
$exec = OCIParse($conn, $sql);
if ($exec){
OCIExecute($exec);
$count = OCIFetchStatement($exec, $results);
echo($count);
}
else{
echo "Cannot execute:" . OCIError();
}
}
In table 'odysea.base01' is 300 rows, i can this rows delete, update, insert, but, when i try thi rows to select, i get this message
ORA-01002 Fetch out of sequence.
I know, what this mean (i am on EOF or cursor is empty - no rows were selected, but why?), i know what is in Oracle manual - 'parse and execute a SQL statement before fetch data', but when you see my code, i think, that i make it...:-(
I felt various examples from internet, but all examples finish at this error....:-(
Thanks for help
Best regards
Radek Budar
mailto:rb_konf@seznam.cz