Re: COUNT returned rows of a SELECT

2008-07-31 Thread Rob Wultsch
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

Re: COUNT returned rows of a SELECT

2008-07-31 Thread Fish Kungfu
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

RE: COUNT returned rows of a SELECT

2008-07-31 Thread Jerry Schwartz
-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

Re: COUNT returned rows of a SELECT

2008-07-31 Thread Perrin Harkins
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

Re: COUNT returned rows of a SELECT

2008-07-31 Thread Fish Kungfu
) 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

COUNT returned rows of a SELECT

2008-07-30 Thread Fish Kungfu
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

Re: COUNT returned rows of a SELECT

2008-07-30 Thread Ananda Kumar
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