How to count rows with a match value?
How to count rows with a match value?
I need to count the number of rows with a specific value and display it in the HTML document.
I use AJAX method POST with a PHP file.
This discussion has been closed.
I need to count the number of rows with a specific value and display it in the HTML document.
I use AJAX method POST with a PHP file.
Answers
Use
rows()with therow-selectoras a function to match your criteria. Chaincount()to get the resulting row count.Kevin
initComplete: function() {
console.log(tableArchives.rows('anyvalue').count());
}
I tried it this way and had no results
Look at the function example in the
row-selectordocs.The variable
tableArchivesis likely not available ininitComplete. Instead usethis.api(). Something like this:Kevin