By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,747 Members | 2,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,747 IT Pros & Developers. It's quick & easy.

oci_num_rows(ocirowcount) is always showing 0 records in PHP with Oracle

P: 5
oci_num_rows(ocirowcount) is always showing 0 records(while having more rows) in PHP with Oracle to fetch total no of records.
Code wrote as follows:

$qry2="select * from USER";
$smt2=ociparse($conn,$qry2);
$r=ociexecute($smt2);
echo 'Total Rows='.ocirowcount($smt2);

Output show always: Total Rows=0
Feb 9 '08 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
Note: This function does not return number of rows selected! For SELECT statements this function will return the number of rows, that were fetched to the buffer with oci_fetch*() functions.
Should be the reason.

Ronald
Mar 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.