Fetching data problems

Fetching data problems

sNok3sNok3 Posts: 5Questions: 2Answers: 0

I'm trying to make a table with different types of data from some players on a server but my Ajax response is:

{"data":null}

The script I'm using for the datatable

Nickname Rank SteamID Date Last Access

$(document).ready(function() {
$('#datatables').DataTable({
"Processing": true,
"ajax": {
"url": "staff.php",
"dataSrc": ""
},
"columns": [
{ "data": "steam_name" },
{ "data": "steamid" },
{ "data": "created_at" },
{ "data": "last_login" }
]
});
});

This question has an accepted answers - jump to answer

Answers

  • sNok3sNok3 Posts: 5Questions: 2Answers: 0

    <table id="datatables" class="table table-hover users" width="100%"> <thead class="text-warning"> <tr> <th class="sorting">Nickname</th> <th>Rank</th> <th>SteamID</th> <th>Date</th> <th>Last Access</th> </tr> </thead> </table>
    I forgot to put the ```

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    That will be a problem then with your server-side script. You'll need to debug that.

    Colin

This discussion has been closed.