title: MySQL DISTINCT function not working
body: <p>Using MySQL. The following SQL statement works perfectly:</p>
  
  <pre><code>SELECT a.ID, a.DISPNAME, a.UNIT_TYPE, a.MODELNUM, a.DESCRIP, a.DATE_ADDED, b.TYP, c.FIRSTNAME, c.LASTNAME FROM jobs_engineering a INNER JOIN unit_types b ON a.UNIT_TYPE=b.ID INNER JOIN users c ON a.AEID=c.USERID ORDER BY a.DATE_ADDED DESC
  </code></pre>
  
  <p>But now I want only unique records to the column <code>DISPNAME</code> as that column has multiple repeated values. I add the <code>DISTINCT</code> method</p>
  
  <pre><code>SELECT a.ID, DISTINCT(a.DISPNAME), a.UNIT_TYPE, a.MODELNUM, a.DESCRIP, a.DATE_ADDED, b.TYP, c.FIRSTNAME, c.LASTNAME FROM jobs_engineering a INNER JOIN unit_types b ON a.UNIT_TYPE=b.ID INNER JOIN users c ON a.AEID=c.USERID ORDER BY a.DATE_ADDED DESC
  </code></pre>
  
  <p>But that does not work. MySQL tells me my error is near "DISTINCT"</p>
  
  <p>I've tried:</p>
  
  <pre><code> a.DISTINCT(DISPNAME)
   DISTINCT(DISPNAME)
  </code></pre>
  
  <p>None of those work</p>
  
  <p>Where is my error? Can anyone help?</p>