Adam Alkins wrote at 15/07/02 04:06

>mysql_num_rows just counts the amount of rows in a query, so if you only
>selected 10 rows, it will return 10.
>
>If you want to count all the rows in the table, its best to use the COUNT()
>function
>
> SELECT COUNT(*) FROM table

In my example, I've selected all rows, ie no search criteria. But let's 
assume that I have in fact searched for something that returns half the 
records in the table (5,000 rows).

How do I get both the number of rows found (5,000) and get a subset of 
the records (ie 0-9, 10-19, 20-29...) so that a user can browse through 
the records rather than getting 5,000 at a time (but still know that a 
total of 5,000 were found).

I hope this makes sense.


-- Clive

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to