Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35272

DataTables with database

$
0
0

Is there any example that uses datasource from the database for DataTables :
http://www.datatables.net/examples/api/row_details.html

If so, is there any links that u can give me? Since i'm just an amateur.

I know the data are on this lines :

$(document).ready(function() {
    var table = $('#example').DataTable( {
        "ajax": "../ajax/data/objects.txt",
        "columns": [
            {
                "className":      'details-control',
                "orderable":      false,
                "data":           null,
                "defaultContent": ''
            },
            { "data": "name" },
            { "data": "position" },
            { "data": "office" },
            { "data": "salary" }
        ],
        "order": [[1, 'asc']]
    } );

but how to change them to fetch the data from sql queries specifically? Since don't have any knowledge on ajax.

Thanks for your kind help


Viewing all articles
Browse latest Browse all 35272

Trending Articles