Re: [PHP] Count in PHP

2002-09-09 Thread xdrag
why not: "select count(*) as counter from table" - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Chuck "PUP" Payne" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, September 10, 2002 1:02 PM

Re: [PHP] Count in PHP

2002-09-09 Thread Tyler Longren
$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" <[EMAIL PROTECTED]> wrote: > I am wanting to do a count in PHP. I want to be able to count the > number of records from a g

RE: [PHP] Count in PHP

2002-09-09 Thread Martin Towell
it's best done in sql using "select count(*)" but can be done in php by looping through the result set -Original Message- From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:58 PM To: PHP General Subject: [PHP] Count in PHP I am wanting to do a count i