Skip to content
server side mongoDB(datatables)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts
README.md
mongodb.html

README.md

datatables-mongodb

server side mongoDB(datatables)

you can use this file to show collection in datatables

example to use:

you can use the file datatables_mongodb.json to load a colection example

create a simple table with headers

CAMPO 1 CAMPO 2 CAMPO 3 CAMPO 4 CAMPO 5

how to call the dates similar how server side processing mysql, postgresql:

$('#example').DataTable( {
    "processing": true,
    "serverSide": true,
    "ajax": {
        "url": "./server_processing_mongodb.php",
        "dataType": "jsonp",
    },
//indicate the names of fields how apeart in mongo collection
"columns": [
        { "data": "campo_1"},
        { "data": "campo_2"},
        { "data": "campo_3"},
        { "data": "campo_4"},
        { "data": "campo_5"}
    ]});

is important to indicate the columns with the name the fields in te collection, you can use data or name to indicate them

You can’t perform that action at this time.