Welcome Guest, Not a member yet? Register   Sign In
Datatables and ORM Model
#2

(This post was last modified: 04-07-2022, 11:41 PM by JustJohnQ.)

I am using sEcho from datatables post, iTotalRecords using row count before applying filters and limit in query and iTotalDisplayRecords as row count after applying filters and limit. aaData is the actual query result.

Code:
$iFilteredTotal = $result['filteredRecords'];
$iTotal        = $result['totalRecords'];

// Output
$output = array ("sEcho" => intval ($_POST['sEcho']), "whichorders" => $member, "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => $result['data']);

$out = json_encode ($output);

EDIT: It looks like the parameter names have been changed in the new datatables version but you get the idea.
Reply


Messages In This Thread
Datatables and ORM Model - by kabeza - 04-07-2022, 08:49 AM
RE: Datatables and ORM Model - by JustJohnQ - 04-07-2022, 11:38 PM
RE: Datatables and ORM Model - by kabeza - 04-08-2022, 04:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB