I'm having trouble showing several values of different fields in the database in the datatable. The code I have from the table is:
var listar = function () {
var table = $('#customers-table-view').DataTable({
destroy: true,
ajax: {
method: 'POST',
url: 'listar'
},
columns: [
{'data': 'customer_code'},
{'data': 'tax_number'},
{'data': 'company_name'},
{'data': 'city'},
{'data': 'state'},
{'data': 'service1'},
{"defaultContent": $botones}
],
In the database I have service1, service2, service3 ... on or off. What I would like is to get those values in the same column. That is to say that in the cell something like that remained; On, Off, Off ... Then I will render the on and the off Thank you very much.