I am using FuelPHP and MySQL, and would like to use the ORM to query with a case insensitive like
query against a column with a case sensitive collation.
For example, in my orm model, I'd like to do something like this:
public static function search_by_name($name)
{
return self::query()->where('name', 'like', '%' . $name . '%')->get();
}
The problem here is that when I search for $name = 'john'
, the expression will not match rows where the column includes John
and vice-versa.
Anyone know how to get around this?