ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: mewbie on January 11, 2018, 10:22:07 am
-
I need to retrieve the number of records returned with its total page for filtering result based on your example.
I can retrieve it with something like this:
$query ="SELECT count(*) FROM table where column='query'";
but not with:
$query ="SELECT count(*) FROM table ".$filterQuery;
When I peeked inside, indeed, $filterQuery is equal to where column= ?
Do you have a workaround?
Thanks
-
I've got it, I should prepare it first before execute,
$stmt= $dbh->prepare($query);
$stmt->execute($filterParam);
But I still like to know the most effective way mixing filter, paging, sorting in php, I still DRY myself in my code.
Do you have that example?
Thanks