>-----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.....GROUP BY?
>
>My primary SELECT query is this:
>
>SELECT aviName,MAX(dateTime) FROM aviTrackerMain WHERE DATE(dateTime)
>LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
>
[JS]

SELECT SQL_CALC_FOUND_ROWS aviName,MAX(dateTime) FROM aviTrackerMain WHERE
DATE(dateTime)
LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
SELECT FOUND_ROWS();

>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
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>infoshop.com





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

Reply via email to