ted_chou12 Posted April 4, 2009 Share Posted April 4, 2009 SELECT * FROM forum WHERE threadid=(SELECT threadid FROM forum WHERE username='{$r6['username']}' AND threadattribute!='votethread' GROUP BY threadid) AND threadattribute='topthread' but it doesn't seem to appear anything, is the subquery used correctly? Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/152514-solved-need-help-with-sub-query/ Share on other sites More sharing options...
fenway Posted April 4, 2009 Share Posted April 4, 2009 Really? Did you even look at mysql_error() after executing the query? You can't just throw group by wherever you want. Quote Link to comment https://forums.phpfreaks.com/topic/152514-solved-need-help-with-sub-query/#findComment-801192 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.