Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT contests.id, contests.post_id, contests.status, GROUP_CONCAT(DISTINCT members.uid ORDER BY members.uid ASC SEPARATOR ', ') AS members
- FROM `contests` contests
- LEFT JOIN `members` members ON contests.post_id=members.post_id
- GROUP BY contests.post_id;
- SELECT contests.id, contests.post_id, contests.status, GROUP_CONCAT(DISTINCT members.uid ORDER BY members.uid ASC SEPARATOR ', ') AS members
- FROM `contests` contests
- WHERE members.won = 1 AND contests.status = 1
- LEFT JOIN `members` members ON contests.post_id=members.post_id
- GROUP BY contests.post_id;
- Unexpected ordering of clauses. (near "WHERE" at position 168)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement