not a valid oci8 statement resource
763719Mar 30 2010 — edited Apr 12 2010I've been grappling this problem sometime, google doesn't help because all the results I get are pages with the same error.
Warning: oci_fetch(): 3 is not a valid oci8 statement resource in /home/dsk10/ugrad/bejhan/web_docs/facttable.php on line 21
Line 21 is: while(oci_fetch($SQL)) {
My loop functions correctly and fetches the results properly though. Here is my connect and creation of the statement:
$c = oci_connect("bejhan", "******");
$SQL = oci_parse($c, "SELECT TIMETRANSACTIONID, TO_CHAR(TDATETIME, 'YYYY-MM-DD HH24:MI:SS') AS PHPDATE, DURATION, TIMECODEDEFID, TEAM, MATERIALTYPE FROM c391.TimeTransactionData78 WHERE ROWNUM < 10 ORDER BY TDATETIME");
oci_execute($SQL);
When I run this query in SQLPlus I don't receive any errors.
What is causing this warning?