note 19309 deleted from function.odbc-num-rows by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 09:00:41 +0000 |
| Subject: | note 19309 deleted from function.odbc-num-rows by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196817@lists.php.net to get a copy of this message | ||
Note Submitter: masuod_a at hotmail dot com
----
i wrote a function for counting odbc records , this function work for all odbc drivers :
function odbc_record_count($sql_id, $CurrRow = 1)
{
if ($NumRecords=odbc_num_rows($sql_id)<0) {
$NumRecords = 0;
odbc_fetch_row($sql_id,0);
while (odbc_fetch_row($sql_id))
{
$NumRecords++;
}
odbc_fetch_row($sql_id, $CurrRow);
}
return $NumRecords;
}