what if there is no record

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jiehuang001
Forum Commoner
Posts: 39
Joined: Mon May 12, 2003 12:53 pm

what if there is no record

Post by jiehuang001 »

I have been using the following code to get result from an Oracle database:
$conn= //details omitted
$stmt = ociparse($conn,$query);
while (OCIFetch($stmt)) {
//do something
}

How can I print "sorry, no record" if there is no record?

Thanks.

Jie Huang
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Never used Oracle but found this in the php manual: Ora_Numrows
Post Reply