odbc_num_rows() function
| From: | Raheel Hussain | Date: | Mon, 28 Oct 2002 10:33:11 +0000 |
| Subject: | odbc_num_rows() function | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16585@lists.php.net to get a copy of this message | ||
hi,
I m doing a database connectivity with MS Access Database
now when i get the recordset with the following code
$rec= odbc_exec($conn,$Qry); //executes without any error
$num_records=odbc_num_rows($rec); //executes without any error
print ($num_records); //prints -1
because it is written in the documentation of this function that it returns -1 with some drivers,
so what should i do.
then i use an alternate method for it
which is
$counter= 0;
while (odbc_fetch_row($rec)) { $counter++; }
print ($counter); //prints the total records
but this alternate way is very time and resource consuming,
any suggestions ???
Raheel Hussain
House-2 , Block-8, Siddiqueabad Housing Society, Malir, Karachi, Pakistan.
Phone : (92)(021) 4505808.
Cell : (92)(021) 0320-5064609.
---------------------------------
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site