$book = array('book1','book2');
$book array elements numbers are variable. it might have 2 element or 20 elements
I need to make a query like this:
select * from book where bookname like %book1% or bookname like %book2%
To make this query in laravel 5 there is an option :
$name = DB::Table('bookinfo')
->select('*')
->wherein('bookname',$book)
->get();
but it use =
operator I need to use like
operator
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…