note 19309 added to function.odbc-num-rows

From: Date: Fri, 22 Feb 2002 17:34:39 +0000
Subject: note 19309 added to function.odbc-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-26941@lists.php.net to get a copy of this message
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; } -- http://www.php.net/manual/en/function.odbc-num-rows.php http://master.php.net/manage/user-notes.php?action=edit+19309 http://master.php.net/manage/user-notes.php?action=delete+19309 http://master.php.net/manage/user-notes.php?action=reject+19309

« previous php.notes (#26941) next »