papaface Posted April 11, 2007 Share Posted April 11, 2007 Hello, I have this code: $_getnames = mysql_query("select inspector_id from requests"); if (mysql_num_rows($_getnames) >0) { while(list($inspector_id) = mysql_fetch_array($_getnames)) That correctly displays the ID's for the inspectors. However how can I make it so it only shows each ID once, rather than displaying it for every record? Thanks Link to comment https://forums.phpfreaks.com/topic/46566-solved-display-once/ Share on other sites More sharing options...
papaface Posted April 11, 2007 Author Share Posted April 11, 2007 Ah i figured it out. select inspector_id from requests group by inspector_id thanks Link to comment https://forums.phpfreaks.com/topic/46566-solved-display-once/#findComment-226648 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.