Re: Count in PHP
| From: | Tyler Longren | Date: | Tue, 10 Sep 2002 05:02:10 +0000 |
| Subject: | Re: Count in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115822@lists.php.net to get a copy of this message | ||
$sql = mysql_query("SELECT * FROM table ORDER BY whatever");
echo(mysql_num_rows($sql));
that should do it.
tyler
On Tue, 10 Sep 2002 00:58:26 -0400
"Chuck \"PUP\" Payne" <cepayne@magidesign.com> wrote:
> I am wanting to do a count in PHP. I want to be able to count the
> number of records from a given database and display this count on the
> page. Can this be done using PHP or is the sql thing?
>
> Chuck Payne
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php