Skip to content

Instantly share code, notes, and snippets.

@DarkCat09
Created June 24, 2021 12:51
Show Gist options
  • Save DarkCat09/3ccef712e326939b45a03e6a15503e52 to your computer and use it in GitHub Desktop.
Save DarkCat09/3ccef712e326939b45a03e6a15503e52 to your computer and use it in GitHub Desktop.
MySQL: Add all the parts of Teen Wolf 3 to the table
DELIMITER //
CREATE PROCEDURE TEENWOLF_PARTS ()
BEGIN
DECLARE I INT DEFAULT 24;
WHILE I > 0 DO
INSERT INTO `parts` (`FilmId`,`PartNum`,`Filename`)
VALUES (20,25-I,CONCAT('C:\\Users\\***YOUR_USERNAME***\\Videos\\Films\\Teen_Wolf_3\\Teen_Wolf_03',LPAD(CONVERT(25-I,VARCHAR(2)),2,'0'),'_WEB-DLrip_VO-production.avi'));
SET i = i - 1;
END WHILE;
END//
CALL TEENWOLF_PARTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment