Minase Posted October 11, 2008 Share Posted October 11, 2008 hmm how i can make this query to make the sum of capture?? i dont have too much time and i need to fix it quick $ranking = mysql_query("SELECT * FROM `" . DBPREFIX . "users` WHERE ClanID != '0' GROUP BY `ClanID` ORDER BY Capture DESC Limit $limit") or die(mysql_error()); the above query works well but i want it to order by capture SUM thx Quote Link to comment https://forums.phpfreaks.com/topic/127981-solved-query-help/ Share on other sites More sharing options...
budimir Posted October 11, 2008 Share Posted October 11, 2008 $ranking = mysql_query("SELECT * FROM `" . DBPREFIX . "users` SUM(capture) as capture WHERE ClanID != '0' GROUP BY `ClanID` ORDER BY Capture DESC Limit $limit") or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/127981-solved-query-help/#findComment-662721 Share on other sites More sharing options...
Minase Posted October 11, 2008 Author Share Posted October 11, 2008 // edit solved with SELECT *, SUM(Capture) s Capture FROM never though that *, SUM(Capture) will work Quote Link to comment https://forums.phpfreaks.com/topic/127981-solved-query-help/#findComment-662723 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.