title: How to use SELECT DISTINCT and CONCAT in the same SQL statement
body: <p>So I am feeding the results of this SQL into an array.  The array later becomes the suggestions for a textbox that operates while typing.  I want it to only return each name 1 time, even if the person has multiple appointments.  Currently, this returns all appointments for the person with that name, so if "Brad Robins" has 5 appointments, and I start to type "Brad", it displays "Brad Robins" 5 times in the suggestions instead of only once.</p>
  
  <pre><code>$sql = "SELECT DISTINCT CONCAT(clients.studentFirstName, ' ', clients.studentLastName) AS name, appointments.location, appointments.subLocation, appointments.appointmentAddress1, appointments.appointmentAddress2, appointments.appointmentCity, appointments.appointmentState, appointments.appointmentZip, appointments.startTime, appointments.endTime, appointments.date, clients.school
                      FROM appointments JOIN clients
                      ON appointments.clientID = clients.clientID
                      WHERE CONCAT(clients.studentFirstName, ' ', clients.studentLastName) = '".$roommate."' AND clients.school = '".$school."';";
  </code></pre>
  
  <p>To me, it just seems like DISTINCT and CONCAT aren't playing nicely together.</p>