ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: stevejacobsen on May 27, 2016, 04:24:16 am

Title: $filterQuery is missing the search data.
Post by: stevejacobsen on May 27, 2016, 04:24:16 am
I captured the post values and got this:

Quote
pq_filter:{"mode":"AND","data":[{"dataIndx":"Description","value":"mo","condition":"begin","dataType":"string","cbFn":""}]}

I then use this code to separate it:

Quote
$filterQuery = "";
$filterParam = array();
if (isset($_GET["pq_filter"])) {
    $pq_filter = $_GET["pq_filter"];
    $dsf = FilterHelper::deSerializeFilter($pq_filter);
    $filterQuery = $dsf->query;
    $filterParam = $dsf->param;
}

and I see the value when I echo $filterQuery

Quote
where Description like CONCAT( ?, '%')
Title: Re: $filterQuery is missing the search data.
Post by: paramvir on May 27, 2016, 03:01:16 pm
This is expected and is ok.

It's a parameterized query, actual values are substituted by $filterParam
Title: Re: $filterQuery is missing the search data.
Post by: kjvjung on August 10, 2017, 12:53:09 pm
I resoled, changed source :

      //$stmt = $dbh->query( $sql );
     $stmt = $dbh->prepare($sql);