Created
April 7, 2012 03:15
-
-
Save thiamteck/2324779 to your computer and use it in GitHub Desktop.
MySql random word function based on Lorem Ipsum text
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
DROP FUNCTION IF EXISTS random_word; | |
CREATE FUNCTION random_word () | |
RETURNS TEXT | |
RETURN (ELT( FLOOR(1 + (RAND() * (100-1))), | |
'Lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'Integer', 'nec', | |
'odio', 'Praesent', 'libero', 'Sed', 'cursus', 'ante', 'dapibus', 'diam', 'Sed', 'nisi', | |
'Nulla', 'quis', 'sem', 'at', 'nibh', 'elementum', 'imperdiet', 'Duis', 'sagittis', 'ipsum', | |
'Praesent', 'mauris', 'Fusce', 'nec', 'tellus', 'sed', 'augue', 'semper', 'porta', 'Mauris', | |
'massa', 'Vestibulum', 'lacinia', 'arcu', 'eget', 'nulla', 'Class', 'aptent', 'taciti', 'sociosqu', | |
'ad', 'litora', 'torquent', 'per', 'conubia', 'nostra', 'per', 'inceptos', 'himenaeos', 'Curabitur', | |
'sodales', 'ligula', 'in', 'libero', 'Sed', 'dignissim', 'lacinia', 'nunc', 'Curabitur', 'tortor', | |
'Pellentesque', 'nibh', 'Aenean', 'quam', 'In', 'scelerisque', 'sem', 'at', 'dolor', 'Maecenas', | |
'mattis', 'Sed', 'convallis', 'tristique', 'sem', 'Proin', 'ut', 'ligula', 'vel', 'nunc', | |
'egestas', 'porttitor', 'Morbi', 'lectus', 'risus', 'iaculis', 'vel', 'suscipit', 'quis', 'luctu')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment