Need help again with num rows

From: Date: Wed, 23 May 2001 08:14:04 +0000
Subject: Need help again with num rows
Groups: php.db 
Request: Send a blank email to php-db+get-9560@lists.php.net to get a copy of this message
I try to get number of row by using "OCIFetchStatement()" .It returns the number of selected rows. But problem was still. The Statements in while loop (see my code below) was not execute and the word "Hello" don't print out. Can anyone help me please? My Code: <?php $num_rows=OCIFetchStatement($stmt,$result); if ($num_rows == 0) { $status="No Entry Found ! <br>\n"; } else { $status="Entry found $num_rows rows"; } while (OCIFetch($stmt)) { $id=OCIResult($stmt,"ID"); $UserId=OCIResult($stmt,"USERID"); $Host=OCIResult($stmt,"HOST"); echo "Hello"; } ?> Thank you very much - Worawisut

« previous php.db (#9560) next »