Hello,
​
I am in the middle of building a PHP coding snippet that pulls data from an API Output. I have in the code multiple filters however for some reason the code will recognize the first filter but not the 2nd. I’ve tried changing the order, other formats, etc but have not figured out a way to solve this. Does someone on here have any ideas? The code is as below.
‘query\_variables’ => ‘filters=REPDTE:20211231,NAME:”‘ . $name . ‘”’,
In this case, it will filter the REPDTE but not the Name (which is input by users). If I switch the order the name works but not REPDTE. In other words, the filters work when they are alone but together it only takes into account the first one in the sequence. Thank you for the assist!
[ad_2]
Well, since we have no clue to what custom code this snippet you gave works with it is all guessing, but if in either case only the first filter is working, are you sure it is allowing multiple filters?
Also, depending on the code that is using it, you may want to make sure $name is validated since it is user input, make sure it doesn’t have a value that can mess with the values (ie, another comma to indicate a new filter set, an equals sign…)