Commit 3c66da7a authored by Carsten  Rose's avatar Carsten Rose
Browse files

F8806 Implement SQL Stored Procedure 'qnl2br()'.

parent 978c1fad
Pipeline #2141 passed with stages
in 2 minutes and 50 seconds
...@@ -50,3 +50,19 @@ DECLARE output TEXT; ...@@ -50,3 +50,19 @@ DECLARE output TEXT;
SET output = REPLACE(input, '|', '\\|'); SET output = REPLACE(input, '|', '\\|');
RETURN output; RETURN output;
END; END;
###
#
# QNL2BR(input)
# replaces '|' in `input` with '\|'
#
DROP FUNCTION IF EXISTS QNL2BR;
CREATE FUNCTION QNL2BR ( input TEXT )
RETURNS TEXT
DETERMINISTIC
BEGIN
DECLARE output TEXT;
SET output = REPLACE( REPLACE(input, CHAR(13), ''), CHAR(10), '<br>');
RETURN output;
END
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment