I think this is OK.
But if you want to get a recordset with data and know how much records you
have with only ONE query,

you may use:
$date=2003-02-16;
SELECT col1, col2, coln  FROM `games` WHERE `date`='$date'
$num_rows=0;
$num_rows=mysql_num_rows($rs_resource_identifier);

I don't remember exactly!!!!

Try it.

Thanks
Emery
----- Original Message -----
From: "Steve Buehler" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 18:40
Subject: COUNT(*) faster?


> I am using PHP & MySQL for a program that I am writing.  I have a table in
> my database that has a column withut dates in it in the form
> yyyy-mm-dd.  Sometimes there is nothing in the table with the search date
> that I am using.  Other times there might be 1000's of rows with that in
> the date column.  I am trying to find out if there are any rows with the
> date that I am searching for in the 'date' column.  Would the fastest way
> be to use
> $date=2003-02-16;
> SELECT COUNT(*) FROM `games` WHERE `date`='$date'
> or is there a faster way?
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to