This file contains hidden or 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
DELIMITER $$ | |
CREATE DEFINER=`root`@`%` PROCEDURE `new_procedure`() | |
BEGIN | |
DECLARE counter int; | |
set counter = 0; | |
while counter < 1000000 do | |
insert into Rating (Rating, MovieID) VALUES (truncate(rand()*10, 0), 1); | |
set counter=counter+1; | |
end while; |
This file contains hidden or 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
$raven = array( | |
"Once upon a midnight dreary, while I pondered, weak and weary,", | |
"Over many a quaint and curious volume of forgotten lore-", | |
" While I nodded, nearly napping, suddenly there came a tapping,", | |
"As of some one gently rapping, rapping at my chamber door.", | |
"\"'Tis some visitor,\" I muttered, \"tapping at my chamber door-", | |
" Only this and nothing more.\"", | |
"", | |
" Ah, distinctly I remember it was in the bleak December;", |
This file contains hidden or 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
DROP FUNCTION IF EXISTS `slugify`; | |
DELIMITER ;; | |
CREATE DEFINER=`root`@`localhost` | |
FUNCTION `slugify`(dirty_string varchar(200)) | |
RETURNS varchar(200) CHARSET latin1 | |
DETERMINISTIC | |
BEGIN | |
DECLARE x, y , z Int; | |
Declare temp_string, new_string VarChar(200); | |
Declare is_allowed Bool; |
This file contains hidden or 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
Function sanitize_title_with_dashes(title As String) As String | |
Dim oDoc As HTMLDocument | |
Set oDoc = New HTMLDocument | |
oDoc.body.innerHTML = title | |
title = oDoc.body.innerText | |
title = LCase(title) |
This file contains hidden or 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
=LOWER(CLEAN(SUBSTITUTE(TRIM(C2)," ","-"))) |
This file contains hidden or 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
=CONCATENATE("INSERT INTO wp_3_terms (name, slug) values ('",C2,"', '",E2,"');"," | |
SET @LASTID = LAST_INSERT_ID();"," | |
INSERT INTO wp_3_term_taxonomy (term_id, taxonomy,parent,count) VALUES(@LASTID, 'media_source', 0,0);", | |
"INSERT INTO wp_3_pods_media_source (@LASTID, ",A2,");") |
NewerOlder