Nas[wD] Posted March 3, 2010 Share Posted March 3, 2010 I get the following from the code: 3 from Nasonix 1 from Ducky 3 from Nasonix 3 from Nasonix when really I want just: 3 from Nasonix 1 from Ducky could anyone help me out? i can't figure this 1 out for the life of me! thanks guys $query = "SELECT * FROM forum_replys WHERE forum_reply_area = '$t'"; $result = mysql_query($query) or die(mysql_error()); while($row1 = mysql_fetch_array($result)) { extract($row1); $test = countreplysperuser("$t", $row1["forum_reply_author"]); echo "$test from $row1[forum_reply_author]<br>"; } Link to comment https://forums.phpfreaks.com/topic/194057-distict-command-retrieves-only-one-instance/ Share on other sites More sharing options...
Nas[wD] Posted March 3, 2010 Author Share Posted March 3, 2010 OHH MY GODD I DID ITT!!! lol! for anyone who was wondering the same thing here you go: $query = "SELECT DISTINCT(forum_reply_author) FROM forum_replys WHERE forum_reply_area = '$t'"; and now I have: 3 from Nasonix 1 from Ducky Link to comment https://forums.phpfreaks.com/topic/194057-distict-command-retrieves-only-one-instance/#findComment-1021100 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.