I’m trying to get names out of a mysql table for an autocomplete (jquery ui). There are duplicate names and I don’t want to show them in the suggestions. I also need to select other columns in the same query. is this possible? I’m using this query atm but there are still duplicate “s_name” returned..
SELECT DISTINCT s_name, s_time, s_auto, s_inout FROM testtable where s_name like '%" . mysql_real_escape_string($_GET['term']) . "%'
Use
GROUP BY(man page):