Server-side datatables. everything is working fine except the search box. Soon as I enter one character in the search, this error shows up:
DataTables warning (table id = 'sample_1'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number' in /home/test/public_html/assets/data-tables/test-pdo.php:99
Stack trace:
#0 /home/test/public_html/assets/data-tables/test-pdo.php(99): PDOStatement->execute()
#1 /home/test/public_html/assets/data-tables/test-pdo.php(143): TableData->get('accounts', 'account_id', Array)
#2 {main}
thrown in /home/test/public_html/assets/data-tables/test-pdo.php on line 99
line 99 is -$statement->execute(); from Bind Parameters
I am using the pdo script for datatables listed here
JSON data from server could not be parsed. Use a network tool (buildin in chrome, firebug, IE10+?), and see what's the answer of your server. Copy the JSON String in some JSON Checker. Hardcode the JSON String the server sends in your JavaScript. Manipulate the string until it works. Then manipulate the server/PHP until he sends the JSON with the right format that you found out with the hardcoded JSON string.