Thank you for your response,
I had to look again at my code and made fix with
$dbh = new PDO($dsn, $db_username, $db_username, $options);
supposed to be :
$dbh = new PDO($dsn, $db_username, $db_password, $options);
and the rest of the code following in the demo page and got me successfully echo the data from my endpoint in
{"totalRecords":10,"curPage":1,"data":[{ .... format
but I'm still unable to get the records on the grid and wonder if it has something to do with old query response in this format :
{"result":"success","message":"query success","data":[{
I put console.log(dataJSON); and got this error :
uncaught exception: Error : SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 5487 of the JSON data
Is it a good idea to break $sb and $product in demo page to accommodate the old format (like $product broken down into mysqli_fetch_array first)?