note 31132 added to function.odbc-num-rows
| From: | deejay_ at rack1 dot php dot net | Date: | Thu, 10 Apr 2003 19:50:48 +0000 |
| Subject: | note 31132 added to function.odbc-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46462@lists.php.net to get a copy of this message | ||
i modified the script of fergus a little bit so that you can give the whole query string to the
function.
Maybe some find this one helpfull.
<?php
function odbc_record_count ($result, $odbcDbId, $query)
{
$numRecords = odbc_num_rows ($result);
if ($numRecords < 0)
{
$countQueryString = "SELECT count(*) as results FROM (".$query")";
$count = odbc_exec ($odbcDbId, $countQueryString);
$numRecords = odbc_result ($count, "results");
}
return $numRecords;
}
?>
deejay_
--
http://www.php.net/manual/en/function.odbc-num-rows.php
http://master.php.net/manage/user-notes.php?action=edit+31132
http://master.php.net/manage/user-notes.php?action=delete+31132
http://master.php.net/manage/user-notes.php?action=reject+31132