N
N
Nikita Dergachov2017-07-25 16:59:43
Laravel
Nikita Dergachov, 2017-07-25 16:59:43

Where clause is case insensitive?

It is necessary to fulfill the request But without regard to the case of the text.
where('text', $text)->get();

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2017-07-25
@vanillathunder

some tough decisions.
https://dev.mysql.com/doc/refman/5.7/en/string-fun...
bring everything to one case faster /less resource-intensive than like.
In general, then you need to use ci encoding so that records and work do not take into account the case at all.

P
pantagruel964, 2017-07-25
@pantagruel964

%like%

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question