DataTable and empty JSON response?

DataTable and empty JSON response?

bperezorozcobperezorozco Posts: 3Questions: 2Answers: 0

Hi,

I have a server-side data source for my DataTable. However, whenever I try to load more than 14 columns from a MySQL view into the DataTable, my script always returns an empty JSON, and the DataTable states no record was found (even though there are records in the MySQL view). I used the debugger and got these results:

1.- With 14 columns: http://debug.datatables.net/osaper . Everything works right here.
2.- With 15 columns: http://debug.datatables.net/uvibux . I don't get a JSON response.

I want to load all 15 columns, and it doesn't matter which one I cross out in order to get a result similar to the first link: it always works for whatever subset of 14 columns, but it won't load a single record whenever I add a 15th column, it always returns an empty JSON from the server script.

Any ideas on how to solve this?

Many thanks

Answers

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin

    The server is responding with 200 Ok, so it isn't indicating any errors. That suggests that the error is in the server-side script somewhere, so you will likely need to add debug information to that.

    From experience the problem, based on your description, is normally that the server isn't configured to handle GET query strings or large lengths. You'd be better using POST to see if that is the issue.

    However, if that is the problem, the server certainly shouldn't be responding with a 200 Ok, since it is not okay!

    Allan

  • bperezorozcobperezorozco Posts: 3Questions: 2Answers: 0

    Thank you very much Allan, changing the call to SSP:simple with $_POST solved the problem.

This discussion has been closed.