Ver original$q = mysql_query ("SELECT `userid` , MAX( `actiondate` ) AS `actiondate` FROM `vtiger_audit_trial` GROUP BY `userid` ORDER BY `actiondate` DESC");$result=mysql_num_rows($q);