title: Select *, max(date) works in phpMyAdmin but not in my code
body: <p>OK, my statement executes well in phpMyAdmin, but not how I expect it in my php page.</p>
  
  <p>This is my statement:</p>
  
  <pre><code>SELECT `egid`, `group_name` , `limit`, MAX( `date` )
    FROM employee_groups
   GROUP BY `egid`
   ORDER BY `egid` DESC ;
  </code></pre>
  
  <p>This is may table:</p>
  
  <pre><code>CREATE TABLE `employee_groups` (
    `egid` int(10) unsigned NOT NULL,
    `date` date NOT NULL,
    `group_name` varchar(50) NOT NULL,
    `limit` smallint(5) unsigned NOT NULL,
    PRIMARY KEY (`egid`,`date`)
  ) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
  </code></pre>
  
  <p>I want to extract the most recent list of groups, e.g. if a group has been changed I want to have only the last change. And I need it as a list (all groups).</p>