In doing a SELECT statement and using GROUP BY city - I have a problem with the way the city has been inputted in the form. So for example, if LONDON has been added in one entry and in another as London, the resulting list - produces LONDON London Ideally I want the GROUP BY to create just one entry London Help!
Thanks.. $q = 'select UPPER(city) AS mycity,mls,department from homes where department = "'.$_GET['department'].'" group by mycity order by mycity asc'; $r = mysql_query($q); while($row = mysql_fetch_array($r)){ $r2 = mysql_query('select city,mls,department from homes where mls = "'.$row['mls'].'" and city = "'.$row['city'].'"'); $num = mysql_num_rows($r2); etc.... How do I modify $r2 statement please?