differentiate the iTotal and iTotalDisplay stats for server processing
differentiate the iTotal and iTotalDisplay stats for server processing
Hi Allan,
I have completely resolved all the issues I need with datatables.
I am left with an academic question.
what does iTotal and iTotalDisplay refer to?
I read that unless filtering is turned on, these two numbers should be the same.
I don't understand.
Anyway, i leave my server-side code to handle all the filtering. Meaning to say I rely on MySQL queries
Select * from products where product.visible = 1 order by products.title asc limit 10, 10
So in such a scenario, I should simply return both the iTotal and iTotalDisplay as the no. of records found for
Select COUNT(*) from products where product.visible = 1
Am i right?
I have completely resolved all the issues I need with datatables.
I am left with an academic question.
what does iTotal and iTotalDisplay refer to?
I read that unless filtering is turned on, these two numbers should be the same.
I don't understand.
Anyway, i leave my server-side code to handle all the filtering. Meaning to say I rely on MySQL queries
Select * from products where product.visible = 1 order by products.title asc limit 10, 10
So in such a scenario, I should simply return both the iTotal and iTotalDisplay as the no. of records found for
Select COUNT(*) from products where product.visible = 1
Am i right?
This discussion has been closed.
Replies
When you apply filtering, you need to send extra information, you need to be able to say how many records are in the filtering result set, hence why there are two parameters.
So no, it is not as simple as just returning the table cardinality, unless you have filtering disabled.
Allan
In that case, i will always return both values as same.