note 112468 added to function.odbc-num-rows

From: Date: Wed, 19 Jun 2013 17:35:51 +0000
Subject: note 112468 added to function.odbc-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-195287@lists.php.net to get a copy of this message
function best_odbc_num_rows($r1) { ob_start(); // block printing table with results (int)$number=odbc_result_all($r1); ob_clean(); // block printing table with results return $number; } Above is the best way to count if you are not using something like IBM Netezza and ODBC and not doing more than 100000ish records, otherwise even this method will run out of memory. IBM Netezza and ODBC will give you counts matching the prefetch setting in the odbc.ini file :( the default is 256 so watch out because it is accurate until that number. ---- Server IP: 69.147.83.199 Probable Submitter: 173.9.14.1 ---- Manual Page -- http://php.net/manual/en/function.odbc-num-rows.php Edit -- https://master.php.net/note/edit/112468 Del: integrated -- https://master.php.net/note/delete/112468/integrated Del: useless -- https://master.php.net/note/delete/112468/useless Del: bad code -- https://master.php.net/note/delete/112468/bad+code Del: spam -- https://master.php.net/note/delete/112468/spam Del: non-english -- https://master.php.net/note/delete/112468/non-english Del: in docs -- https://master.php.net/note/delete/112468/in+docs Del: other reasons-- https://master.php.net/note/delete/112468 Reject -- https://master.php.net/note/reject/112468 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195287) next »