RE: PHP + MySQL, how to get total rows matched when using LIMIT 0, 10?

From: Date: Tue, 05 Nov 2002 21:58:23 +0000
Subject: RE: PHP + MySQL, how to get total rows matched when using LIMIT 0, 10?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122873@lists.php.net to get a copy of this message
> I'm trying to get the total matched rows when I'm using "LIMIT 0, 10", > but I only get the number 10, when the total should be around 100. So, > can I get total matched rows without doing a separate query using > count()? You first have to get the whole result set without the limit OR make use of count(*) and parse the result of count. Since it only returns 10, it's correct the the total matched rows is 10. sql query.... Regards, Jeroen Geusebroek

« previous php.general (#122873) next »