text_filter

Is it possible to change the server side text_filter to replace the LIKE logic with a startsWith logic?

docs.dhtmlx.com/connector__php__filtration.html

My question is, I suppose, whether the operation below can be something like a regexp or startsWith.

function custom_filter($filter_by){ if (!sizeof($filter_by->rules)) $filter_by->add("some_field","value","LIKE"); //change WHERE some_field LIKE '%value%' to the WHERE some_field > 'value' $index = $filter_by->index("some_field"); if ($index!==false) //a client-side input for the filter [b] $filter_by->rules[$index]["operation"]=">";[/b] } $conn->event->attach("beforeFilter","custom_filter");

Yep, it will be like next

function custom_filter($filter_by){ $index = $filter_by->index("some_field"); if ($index!==false) //a client-side input for the filter $filter_by->rules[$index]["operation"]=" LIKE "; $filter_by->rules[$index]["value"] = $filter_by->rules[$index]["value"] . "%"; } $conn->event->attach("beforeFilter","custom_filter");

It will build search string like WHERE some LIKE “value%”, and will work as startsWith logic