I know about mysql_num_rows ( resource $result ), but I read somewhere that this is not 100% accurate. I saw other alternatives that actually get each line and start the counter, but that sounds pretty inefficient. I am interested to know what others are doing to get an accurate and effective score.
mysql_num_rows ( resource $result )
Use mysql_num_rows()when you have completed the request SELECT, or SHOW, and mysql_affected_rows()in the case of queries INSERT, UPDATE, REPLACE or DELETE.both are pretty accurate!
mysql_num_rows()
SELECT
SHOW
mysql_affected_rows()
INSERT, UPDATE, REPLACE or DELETE
mysql_num_rows() , mysql_unbuffered_query().
mysql_unbuffered_query()
mysql_query(), mysql_num_rows() .
mysql_query()
mysql_unbuffered_query(), mysql_num_rows() , .
, , .
. - COUNT WHERE . . , 1000 , 10 .
, , . , , .
Source: https://habr.com/ru/post/1713718/More articles:DWR as a Javascript library for REST - javascriptHow to check and access javadoc / source for Maven artifacts - pluginsCancel BeginInvoke in WPF - multithreadingКаков самый быстрый способ получить количество строк innodb tables, в mysql 4.0? - mysqlBest open source extensible crawler used to crawl images - language-agnosticHow to capture the screen print key? - c #Closing popups on session expiration - javaSimple hardware RNG - randomWhich bugtracker works best with Eclipse Mylyn on a Windows server? - bug-trackingProgrammatically loading clojure libraries - clojureAll Articles