Net_RouterOS icon indicating copy to clipboard operation
Net_RouterOS copied to clipboard

"LIKE" in query

Open luizsilva-dev opened this issue 4 years ago • 1 comments

I need to use LIKE in the query and I did not find this information in the documentation.

I need something like that: `$util->getAll(array(), RouterOS\Query::where('user-ip', '10.10.%', 'LIKE'));

I checked each file in the repository and I didn't find that information. Is there another way to make this filter?

luizsilva-dev avatar Feb 22 '21 04:02 luizsilva-dev

Unfortunately, that's not possible on a protocol level. See this part of the spec.

The only way you can do that to filter whatever else you can, obtain that from the router, and then further filter the results on the PHP side.

MikroTik once upon a time announced they may eventually (at an unspecified time in the future) maybe add support for regex matches to the protocol, which would allow you to do this filtering, but that's not the case yet it seems.

boenrobot avatar Feb 22 '21 10:02 boenrobot