Showing 1 to 0 of 0 entries... wait, what?

Showing 1 to 0 of 0 entries... wait, what?

frank.oosterhuisfrank.oosterhuis Posts: 5Questions: 0Answers: 0
edited August 2010 in TableTools
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?

Replies

  • frank.oosterhuisfrank.oosterhuis Posts: 5Questions: 0Answers: 0
    well, this is fun.
    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..
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Heh - good to hear you got it sorted. Funny thing is that I haven't seen this question in the forum before, and now in about 2 days, there have been four posts about it. Did this come from a tutorial or something? Or just random coincidence?

    Regards,
    Allan
  • frank.oosterhuisfrank.oosterhuis Posts: 5Questions: 0Answers: 0
    for all I know this is just random.
    I kinda missed the other posts about this aswell.. (again: sorry)
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    No problem at all. Lots of funny coincidences going on just now. Maybe "they" are watching me after all ;-)

    Regards,
    Allan
This discussion has been closed.