Master child tables - Create child from database
Master child tables - Create child from database
Hi, I'm trying to work with master/child tables and i've seen this example:
http://www.datatables.net/release-datatables/examples/api/row_details.html
But i want to get data from my database and in this example is created a fixed table. How can i do to call a function in a file .php which let me connect to the database and get data.
[code]
/* Formating function for row details */
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += 'Rendering engine:'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
return sOut;
}
[/code]
Thanks
http://www.datatables.net/release-datatables/examples/api/row_details.html
But i want to get data from my database and in this example is created a fixed table. How can i do to call a function in a file .php which let me connect to the database and get data.
[code]
/* Formating function for row details */
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += 'Rendering engine:'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
return sOut;
}
[/code]
Thanks
This discussion has been closed.