Re: What are the accepted "Query Params"
Reply #4 –
Please can you share sample of the getcount_products function.
Since you are modifying the ComponentController,
I'll suggest you do something like this in the function.
if(!empty($_GET['category'])){
$sqltext = "SELECT count(*) AS num FROM products where category=?";
$arr = $db->rawQueryValue($sqltext, array($_GET['category']));
}
else{
$sqltext = "SELECT count(*) AS num FROM products";
$arr = $db->rawQueryValue($sqltext,);
}