Re: Select a subset?

From: Date: Mon, 15 Jul 2002 03:06:42 +0000
Subject: Re: Select a subset?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20539@lists.php.net to get a copy of this message
> ie start at record 10 and show the next 10. But this delivers back "10" > as the $num_rows variable, when I want the total number of rows. > > I don't really have to complete two querys to get the appropriate values > do I? 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 -------------- Adam Alkins http://www.rasadam.com --------------

« previous php.db (#20539) next »