Re: PHP4 and MySql - Search Results Question?
| From: | George Nicolae | Date: | Mon, 05 Aug 2002 08:52:45 +0000 |
| Subject: | Re: PHP4 and MySql - Search Results Question? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111191@lists.php.net to get a copy of this message | ||
I think the answer is mysql_num_rows().
Take a look at http://www.php.net/manual/en/function.mysql-num-rows.php
--
Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Jason Caldwell" <jason@thinkingman.org> wrote in message
news:20020802210130.66098.qmail@pb1.pair.com...
> I'm using PHP4 and MySQL --
>
> I'm trying to write a small search engine -- got it working, however, what
> I'd like to do is return the TOTAL records found.
>
> You see, right now I am using LIMIT within my SQL -- so I only return 15
> results at a time.
>
> How do I get the total (say for example there are 2000 records) -- do I
need
> to COUNT(*) first, then perform another SELECT query for my search?
>
> Or, is there a PHP/MYSQL command that returns the total records matching
my
> SELECT query irregardless of the LIMIT ??
>
> Thanks
> Jason
>
>