Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT u.*,
- r.autocompletion,
- (SELECT COUNT(DISTINCT a.user_id)
- FROM emissions e
- INNER JOIN abonnements a
- ON a.emission_id = e.id
- WHERE e.main_rea = u.id
- OR Find_in_set(u.id, e.others_rea) > 0) AS abonn
- FROM users u
- LEFT JOIN realisateurs r
- ON r.user_id = u.id
- WHERE u.user_type = "realisateur"
Add Comment
Please, Sign In to add comment