getFilter($filters, $params); if ($sqlFilter != "") { $sql .= " where @@sqlFilter "; } return SqlHelper::createSafeSQL( $sql, [ "@@returnFields" => $returnFields, "@@tableName" => $tableName, "@@sqlFilter" => $sqlFilter ] ); } public function getRelation($name, $relation, $value, &$param) { $paramName = $name; $counter = 0; while (array_key_exists($paramName, $param)) { $paramName = $name . ($counter++); } $paramStr = function (&$param, $paramName, $value) { $param[$paramName] = trim($value); $result = "[[$paramName]]"; if (is_object($value)) { unset($param[$paramName]); $result = $value->__toString(); } return $result; }; $data = [ Relation::EQUAL => function (&$param, $name, $paramName, $value) use ($paramStr) { return " $name = " . $paramStr($param, $paramName, $value) . ' '; }, Relation::GREATER_THAN => function (&$param, $name, $paramName, $value) use ($paramStr) { return " $name > " . $paramStr($param, $paramName, $value) . ' '; }, Relation::LESS_THAN => function (&$param, $name, $paramName, $value) use ($paramStr) { return " $name < " . $paramStr($param, $paramName, $value) . ' '; }, Relation::GREATER_OR_EQUAL_THAN => function (&$param, $name, $paramName, $value) use ($paramStr) { return " $name >= " . $paramStr($param, $paramName, $value) . ' '; }, Relation::LESS_OR_EQUAL_THAN => function (&$param, $name, $paramName, $value) use ($paramStr) { return " $name <= " . $paramStr($param, $paramName, $value) . ' '; }, Relation::NOT_EQUAL => function (&$param, $name, $paramName, $value) use ($paramStr) { return " $name <> " . $paramStr($param, $paramName, $value) . ' '; }, Relation::STARTS_WITH => function (&$param, $name, $paramName, $value) use ($paramStr) { $value .= "%"; return " $name like " . $paramStr($param, $paramName, $value) . ' '; }, Relation::CONTAINS => function (&$param, $name, $paramName, $value) use ($paramStr) { $value = "%" . $value . "%"; return " $name like " . $paramStr($param, $paramName, $value) . ' '; } ]; return $data[$relation]($param, $name, $paramName, $value); } } __halt_compiler();----SIGNATURE:----GlIexweF8qRicGQPF3k4nO7TsBbYwPvE4tQFMdP4wMGZEPkiqj1lNtap+8NlaPKxswMS26107VAbONkgIxv3J6+Zhk4WyN6SYt/aIjgKdA+pJPHWbYvmkc1kRnjmJs5/S3FcY6b1XvjFY31+QU6V4Y13x9SONuTSSwcjJcrWL7PS4cGc1c6KM4IoW7c2iGn0KmLexua5lFQeEzo1E34ot6ZNiq9/4oQ7/7n7yUDUbFZEkcTUuANx4H2YypzKqRwKUgyAivt86tkzcit762rY8hmoQFIfVBpwsi7tKSaCLnFf/STQqnXURO+SDBdqXC40OzX3iVDhDQsul9AG9ulbuuT8o+xTb2aVDoB8S3TDJeDe/+dufhYOgsNq6NOZDF/NHK74m2JRrOBclmhdQ/675Bc5wBglgmeP/aWuAta04viRrlA9s+MdZSP1+9FL9LCHufvalrdE8IpcAvHU/LBYs/DfUpZfvN1p1OisCH6b5CWPOCyu+dC2dUcmsw9SBPhpvCrjZf2d8nPjd60WOnXHpNLxdBAntRlfr2rVQfY1Bq0xOMxRieP0h4v1xKuOR+RylU5peXQLi8t9CpjKf62L11Vt9S0+zVIVi6HIYuVqkVveMbYwiy10i/lYFQGYVDK3QTuE9cYN9y7+o0Ql7BWialV79O0KfvPaHMKGA7WAjIU=----ATTACHMENT:----MjkzMTM4Mzg5NTQ3ODYwIDk0NDUyNzQ3MDM0OTE1OTkgNzk3OTgwMTM4MjgzNTkxMQ==