As you know that FIND_IN_SET is case-insensitive. That means if your list has a,b and you want to search B, it will return the position of b.

To be case sensitive, add binary modifier to the 1st argument:

FIND_IN_SET(binary 'value', `field`)

Refs: #

  • https://github.com/tpetry/laravel-query-expressions/pull/3

Powered by VuePress
Copyright 2010-2024 Thai Nguyen Hung all rights reserved.