COUNT MYSQL functions in Editor
COUNT MYSQL functions in Editor
Hello,
How to add COUNT or SUM MSQL functions to MJoin. Is there any possibility?
I need average in field Datatable and use ajax call but the loading is slow
{ data: 'provider.id', render: function (data, type, row) {
$.ajax({
type: 'POST',
data: parametros,
url: 'php/get-average.php',
async: false,
success: function (response) {
average=response;
},
error: function (response) { }
});
return average;
} },
Answers
Rather than using a count, you could just use the
.length
property of the array that is returned from the server. In this case:assuming
provider.id
is the array - it might beprovider.length
you need to use, but I'm not certain without being able to see the data.Allan