Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
8bf21e2f
Commit
8bf21e2f
authored
Aug 08, 2019
by
Carsten Rose
Browse files
Merge branch 'F8806SQLFunctionNl2br' into 'master'
F8806 Implement SQL Stored Procedure 'qnl2br()'. See merge request
!171
parents
978c1fad
3c66da7a
Pipeline
#2142
passed with stages
in 2 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Sql/function.sql
View file @
8bf21e2f
...
...
@@ -49,4 +49,20 @@ BEGIN
DECLARE
output
TEXT
;
SET
output
=
REPLACE
(
input
,
'|'
,
'
\\
|'
);
RETURN
output
;
END
;
\ No newline at end of file
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment