Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to hidden error message while retrieve data from oracle?

Status
Not open for further replies.

alan123

MIS
Joined
Oct 17, 2002
Messages
149
Location
US
I have a php page which connect to oracle table, there is one data need to pull out from oracle, if not exist then I want to leave it blank.
But when I write the code:
Code:
$query = "select name from table where field1='$abc'";
ora_parse($cursor, $query); 
ora_exec($cursor);

If $abc exists in table, it has no problem to pull the data, if $abc doesn't exist, then it shows all error message on php page.(Warning: Ora_Fetch failed (ORA-01002: fetch out of sequence -- while processing OCI function OFETCH/OFEN) in .....)

How can I get rid of these error message?

thanks.
 
Not sure if the oracle librariers will provide you with a direct method, if so I'm sure someone will tell you. If not though, output buffering will do the trick, what you'll do in that case is turn it on, turn it off, throw away the contents...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top