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 DATE(dateTime)
> LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
>
> And it faithfully returns x-number of rows.  However, I want to be able
> to capture the number of rows it returns.  If I have to I will use PHP,
> but I was hoping for a way to do it with just MySQL.
>
>
> Thanks very much in advance......Fish

FOUND_ROWS() might be a solution that works for you. Take a look at:
http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows

-- 
Rob Wultsch

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

Reply via email to