Want to add link to 1 column whilst using sql data

Want to add link to 1 column whilst using sql data

tgcowelltgcowell Posts: 2Questions: 0Answers: 0
edited February 2014 in DataTables 1.9
Currently have a SQL db providing the data for my table. I want to add a link to 1 of the columns which will us the id column within the SQL db to send the user to a new page.

Below is my HTML markup:

[code]


Hospital Name
State
Status



Loading Data



Hospital Name
State
Status




[/code]

Now the Javascript

[code]

$(document).ready(function() {
$('#projects').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "includes/server_processing_projects.php"
});
});


[/code]

I want the link on the Hospital Name Column and the link to be like this

[code]Hospital Name[/code]

I'm new to web development and very much learning as I go, I've looked online regarding the mRender and mData which seem to be the solution... But I cannot figure out how it all works.

There was also a post on fnRender which appears to no longer be in use, since upgrading the 1.9?

Appreciate any assistance with this issue!

Thanks
Tim

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Why not just amend the element in your results array in your PHP file?
This discussion has been closed.