Okay
  Public Ticket #1238762
HyperLinks
Closed

Comments

  • Jon started the conversation

    We Need our table to Render a MachID number from MySql database, we need this MachID to fire a Hyperlink similar to: ~\machines\MachQuote.aspx?MachID={0}.

    The intend is for the table to display the MachID, but Hyperlink to the actual Machine quote based on the MachID number clicked.

    If you need us to add another field to MySql database that reads i.e.: Machines/MachQuote.aspx?Mach=10182 that the MachID refers to we can do that too.

    What is the best way to encode this Hyperlink call out in wpDataTable?

  •  1,845
    Miloš replied

    Hi Jon,
    Thank you for your purchase.

    Sorry but I did not quite understand what are you trying to achieve.
    Can you please describe me more so I can give you my suggestion.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

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

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Jon replied

    We need to (PHP code) or some other method that allow us to make the MachID Field (hyperlink) that executes a simple command to:

    $id = $_GET['machid'];
    $result = mysqli_query($con,"SELECT (WHATEVER YOU WANT) FROM (YOUR TABLE) WHERE machid = $machid");

    The goal here is to have the hyperlink field point to a specific Machid and a specific page on our site.

    echo "<td><a href=\"mysqlupdate2.php?MachID=$MachID=\">$MachID=</a></td>"; 

    Can I recode the select table query and add this type of call out?


  • [deleted] replied

    Hi Jon,

    For manipulating data in URL column we have built in filter

    wpdatatables_filter_link_cell

    which allows you to change value in that column before it is passed to the front-end. 

    other option would be to concat URL text with that Id on MySQL side with CONCAT function