MySQL CONCAT href - 大于/小于符号显示为 > < in HTML code instead of > <

问题描述 投票:0回答:0

我正在尝试使用 CONCAT 在 MySQL SELECT 中创建超链接字段,但该值并未显示为超链接,而是显示为页面上的文字 href 语句。页面上显示的 HTML 看起来是正确的:

\<a href="http://example.com:4200/event/view/4601">4601\</a>

但我在 HTML 中注意到,我认为这是问题所在,大于号和小于号显示为 > 和 < instead of > 和 <:

&lt;a href="http://example.com:4200/event/view/4601"&gt;4601&lt;/a&gt;

我的问题是,如何让大于号和小于号显示为 > 和 < instead of > 和 < given the following SQL CONCAT statement?:

CONCAT('\<a href="http://example.com:4200/event/view/',e.event_id,'">',e.event_id,'\</a>') AS 'Event-ID',

所以 Event-ID 字段显示,或者应该显示一个超链接。

mysql hyperlink concatenation href
© www.soinside.com 2019 - 2024. All rights reserved.