Last active
January 6, 2016 22:40
-
-
Save bisby/1822b76e27759d1a5f7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE i INT; | |
DECLARE cur CURSOR FOR SELECT blog_id FROM wp_blogs; | |
OPEN cur; | |
read_loop: LOOP | |
FETCH cur INTO i; | |
IF done THEN | |
LEAVE read_loop; | |
END IF; | |
yourFunction(i); | |
END LOOP; | |
CLOSE cur; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment