Fetching data problems
Fetching data problems
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
<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 ```
That will be a problem then with your server-side script. You'll need to debug that.
Colin