Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Drop Function if exists grcms_rating_isValidImageId
- Create Function grcms_rating_isValidImageId(id bigint(20)) returns BOOL
- BEGIN
- DECLARE id_exists BOOL;
- IF EXISTS (SELECT * FROM grcms_rating_images WHERE meta_id = id)
- SET id_exists = true;
- ELSE
- SET id_exists = false;
- END IF;
- RETURN(id_exists);
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement