Okay
  Public Ticket #2915435
Merging columns
Closed

Comments

  • Luka started the conversation

    Hello,


    I have one column which is a "User Name" and another column which is a "User Link" or weblink to the profile page of that user. Is it possible to just show a "User Name" which is a hyperlink and leads to the link from another column?


    Thanks a lot,

    Luka

  •  472
    Isidora replied

    Hi Luka,

    Sorry for the late response, we have some agents that have contracted Covid-19, so our team is cut in half.

    Yes, but only with SQL based tables at the moment.

    If you have data in database you can use CONCAT function in mysql. On this link you have example how to achieve this with query.

    For Example

    SELECT  yourTable.column1,
            yourTable.column2,
            CONCAT('<a href="',yourTable.userlink,'" class="yourclass">',yourTable.username,'</a>') AS hyperlink
    FROM yourTable


    Of course you will replace all data like (yourTable, column1, column2, userlink and username) with your actual data from table from database.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables