Barand Posted August 20, 2015 Share Posted August 20, 2015 I have changed my tables and query, which is now $sql = "SELECT username , week , SUM(points) FROM ( SELECT a.username , a.week , CASE WHEN pick=result THEN value ELSE 0 END as points FROM allpoints a INNER JOIN phpfb_picks p USING (username,gameid) INNER JOIN phpfb_schedule s USING (week,gameid) ) wktots GROUP BY username, week"; The results are the same 1 Quote Link to comment https://forums.phpfreaks.com/topic/297862-code-help-please/page/2/#findComment-1519319 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.