Guest User

Untitled

a guest
Dec 13th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. drop procedure if exists `proc_checkWhitelist`;
  2. create procedure `proc_checkWhitelist`(in p_instanceId int, in p_uniqueId varchar(128))
  3. begin
  4. select
  5. if(i.whitelist = 1, coalesce(is_whitelisted, 0), 1)
  6. from
  7. instances i
  8. left join profile p on p.unique_id = p_uniqueId
  9. where
  10. i.instance = p_instanceId; --
  11. end;
Add Comment
Please, Sign In to add comment