Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( isset( $_POST['_search'] ) && $_POST['_search'] == 'true' ) {
- $operations = array(
- 'eq' => "= '%s'", // Equal
- 'ne' => "<> '%s'", // Not equal
- 'lt' => "< '%s'", // Less than
- 'le' => "<= '%s'", // Less than or equal
- 'gt' => "> '%s'", // Greater than
- 'ge' => ">= '%s'", // Greater or equal
- 'bw' => "LIKE '%s%%'", // Begins With
- 'bn' => "NOT LIKE '%s%%'", // Does not begin with
- 'in' => "IN ('%s')", // In
- 'ni' => "NOT IN ('%s')", // Not in
- 'ew' => "LIKE '%%%s'", // Ends with
- 'en' => "NOT LIKE '%%%s'", // Does not end with
- 'cn' => "ILIKE '%%%s%%'", // Contains , case insensitive
- 'nc' => "NOT LIKE '%%%s%%'", // Does not contain
- 'nu' => "IS NULL OR %s =''", // Is null,
- 'nn' => "IS NOT NULL" // Is not null
- );
- $filters = json_decode( $_POST['filters'] ); // this is a result of an ajax call from a jqgrid
- foreach($filters->rules as $filter){
- $searchField = $filter->field;
- $searchOperator = $filter->op;
- $searchString = $filter->data; // the problem is here, it contains htmlentities (Like in my case)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement