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

From: Date: Tue, 05 Nov 2002 21:54:00 +0000
Subject: 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-122870@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()? Here is an example of my current query: $result = mysql_query("SELECT * FROM products WHERE price<'10' ORDER BY price LIMIT 0, 10"); $num_rows = mysql_num_rows($result); Thanks, Sumarlidi E. Dadason _________________________________ E-mail: sed@sed.is website: www.sed.is

« previous php.general (#122870) next »