-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oci_fetch_assoc(): ORA-01002: fetch out of sequence #1701
Comments
Could you show the query (or most likely a series of queries) that triggers the warning? |
I was using the CI Active Record and ran the following: $query = $this->db->get_where('TABLENAME', array('ID' => $id));
return $query->result(); Which generates the following: SELECT * FROM TABLENAME WHERE "ID" = '12345678' |
It's unlikely that this single query is the cause of the warning being issued. See this link for more info: http://www.dba-oracle.com/t_ora_01002_fetch_out_of_sequence.htm ... I'd rather like to find the real cause and fix it. |
@narfbg I have other methods in my model with queries being run before and after, but when I was trying to troubleshoot I commented out the queries and added them back one by one and this was the query that generated the error. |
OK, can you show the queries that are executed prior to this one? And do you use cursors and/or prepared statements? |
Here are the queries. I'm not using any cursors that I know of, unless the CI Active Record is creating them.
|
This solved my problem, jst tks |
I am getting a PHP Warning for a query I am using for an Oracle Database. It works fine when I run the SQL query in SQL Developer, however it gives the error when viewing the page in the browser (through PHP and CodeIgniter).
I checked the following thread on the Forums (http://codeigniter.com/forums/viewthread/208846/) and it seems one solution is to put the
@
character in front ofoci_fetch_assoc($id)
on line 155 of theoci8_result.php
file.So the function would now be
Not sure why this warning is being caused or what other solution there is.
As some added information. I am running my application on Ubuntu 10.04.3 LTS with PHP 5.3.2-1ubuntu4.17 and the Oracle database is version 10g.
The text was updated successfully, but these errors were encountered: