On Wed, Jul 30, 2008 at 9:41 PM, Fish Kungfu [EMAIL PROTECTED] wrote:
Using MySQL commands only (not PHP's mysql_num_rows), is there a way to
COUNT the number of rows returned from a SELECT.GROUP BY?
My primary SELECT query is this:
SELECT aviName,MAX(dateTime) FROM aviTrackerMain WHERE
Thanks for trying guys, but that's still not quite what I'm looking
for. All I really want is the total number of rows returned for the
query result.
For example, my the SELECT that Ananda suggested returns this:
mysql SELECT aviName,MAX(dateTime) ,count(*) FROM aviTrackerMain WHERE
-Original Message-
From: Fish Kungfu [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2008 12:41 AM
To: mysql@lists.mysql.com
Subject: COUNT returned rows of a SELECT
Using MySQL commands only (not PHP's mysql_num_rows), is there a way to
COUNT the number of rows returned from a SELECT
On Thu, Jul 31, 2008 at 8:00 AM, Fish Kungfu [EMAIL PROTECTED] wrote:
Ideally, I was hoping COUNT() could work like this, BUT it doesn't of
course:
mysql SELECT COUNT(SELECT aviName,MAX(dateTime) ,count(*) FROM
aviTrackerMain WHERE DATE(dateTime) LIKE CONCAT(DATE(NOW()),'%') GROUP
BY
)
CheersFish
-Original Message-
From: Roy Lyseng [EMAIL PROTECTED]
Sent: Jul 31, 2008 9:41 AM
To: Fish Kungfu [EMAIL PROTECTED]
Subject: Re: COUNT returned rows of a SELECT
Hi,
generally you should be able to use the select query as a derived table,
and select the row count from
Using MySQL commands only (not PHP's mysql_num_rows), is there a way to
COUNT the number of rows returned from a SELECT.GROUP BY?
My primary SELECT query is this:
SELECT aviName,MAX(dateTime) FROM aviTrackerMain WHERE DATE(dateTime)
LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
And it
SELECT aviName,MAX(dateTime) ,count(*) FROM aviTrackerMain WHERE
DATE(dateTime)
LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
This will also give you count of rows
On 7/31/08, Fish Kungfu [EMAIL PROTECTED] wrote:
Using MySQL commands only (not PHP's mysql_num_rows), is there a way to