Current location: Hot Scripts Forums » Programming Languages » PHP » Selct problem in Oracle


Selct problem in Oracle

Reply
  #1 (permalink)  
Old 02-14-04, 04:03 AM
budik budik is offline
New Member
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Selct problem in Oracle

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
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php in linux problem usman PHP 6 05-15-04 11:57 AM
Small problem for a pro, but for novice like me... argh! ntek Perl 3 11-19-03 01:45 PM
file download problem ukyankee Perl 6 10-04-03 10:39 PM
Let's talk about Oracle fouad Database 5 09-22-03 11:08 PM
jpGraph axis labeling problem Squeezer PHP 2 08-20-03 07:53 AM


All times are GMT -5. The time now is 08:48 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.