charts.js help needed
I m creating chart using http://www.chartjs.org This is as per my client requirements.
So in chart i gotta display no of products in each category.
Products & Categories are created from dataassist So i believe the DB structure is well known to all here.
So i want to know what will be the fastest & easiest way to display this.
Currently i created RS of each ProductCategory ex:
$query_A = "SELECT CatID FROM Products WHERE CatID = 1";
$query_B = "SELECT CatID FROM Products WHERE CatID = 2";
& so on.. then using value: <?php echo $totalRows_A ?>,
So this is making me create tooo many RS.
So if clients add new category i don't want to manually add rs to each pages.
So how can this be done auto?
There must be a simple & easy way. i m not able to fix it. Please advise.