Answer the question
In order to leave comments, you need to log in
How to work with the like operator?
I'm making a request to the database to fetch data:
$q = Book::find()->where(['like', 'name', $letter])->all();
SELECT * FROM book WHERE name LIKE '%значение%'
SELECT * FROM book WHERE name LIKE 'значение%'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question