Showing 1 to 0 of 0 entries... wait, what?
Showing 1 to 0 of 0 entries... wait, what?
frank.oosterhuis
Posts: 5Questions: 0Answers: 0
I'm using dataTables with a serverside-script as resource (php).
Whenever the table is empty (or even filtering to an empty resultset) my table still thinks that there's still one record to display.
Data returned by PHP:
[code]{"sEcho":1,"iTotalRecords":"0","iTotalDisplayRecords":"0","aaData":[]}[/code]
The resultset is cleary empty, and actually very similar to the example:
[code]{"sEcho": 4, "iTotalRecords": 57, "iTotalDisplayRecords": 0, "aaData": [] }[/code]
Does anyone have any clues on how to fix this issue?
Whenever the table is empty (or even filtering to an empty resultset) my table still thinks that there's still one record to display.
Data returned by PHP:
[code]{"sEcho":1,"iTotalRecords":"0","iTotalDisplayRecords":"0","aaData":[]}[/code]
The resultset is cleary empty, and actually very similar to the example:
[code]{"sEcho": 4, "iTotalRecords": 57, "iTotalDisplayRecords": 0, "aaData": [] }[/code]
Does anyone have any clues on how to fix this issue?
This discussion has been closed.
Replies
starting this topic (with syntax hilights) made me realise the difference between the two JSON objects.
I've fixed this using intval in PHP.
Meh, I hate it when solutions are this simple, and yet take me this much effort.
Sorry for opening this rather useless topic..
Regards,
Allan
I kinda missed the other posts about this aswell.. (again: sorry)
Regards,
Allan