From: Daevid Vincent Date: October 23 2007 1:04am Subject: How to know the number of rows used in a SELECT MAX() query? FOUND_ROWS() not working. List-Archive: http://lists.mysql.com/mysql/209629 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Is there a way to know how many rows were used in a computation? I tried this 'trick' but I still get 1, when I know that there are 3 rows used... SELECT SQL_CALC_FOUND_ROWS MAX(DATE_ADD('2007-10-18 18:04:45', INTERVAL user_access_hours HOUR)), MAX(access_expire) FROM end_user_groups JOIN end_user_group_links ON gid = id WHERE enabled = 1 AND uid = 16; select FOUND_ROWS();