Concat and dbr.html:

(2 posts) (2 voices)

Tags:

  1. cris, Member

    Why does this work:
    SELECT CONCAT('dbr.html:<b>', 'a', '</b>', ' b', ' c') AS 'Bold A';

    But this doesn't:
    SELECT CONCAT('a', ' dbr.html:<b>', ' b', '</b>', ' c') AS 'Bold B';

    I must be missing something obvious or doing something wrong?

    Thanks,
    Cris

  2. myDBR Team, Key Master

    Cris,
    the whole string is treated as HTML if it starts with 'dbr.html:'. When put in the middle of the string, it will not be evaluated.

    So, to bold the b when using CONCAT, use:

    SELECT CONCAT('dbr.html:', 'a ', '<b>', ' b', '</b>', ' c') AS 'Bold B';

    or without CONCAT:

    SELECT 'dbr.html:a <b>b</b> c' AS 'Bold B';

    --
    myDBR Team


Reply

You must log in to post.