Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Drop Function if exists grcms_rating_isValidImageId
  2. Create Function grcms_rating_isValidImageId(id bigint(20)) returns BOOL
  3. BEGIN
  4. DECLARE id_exists BOOL;
  5. IF EXISTS (SELECT * FROM grcms_rating_images WHERE meta_id = id)
  6. SET id_exists = true;
  7. ELSE
  8. SET id_exists = false;
  9. END IF;
  10. RETURN(id_exists);
  11. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement