get all rows in single query with multiple id - development

get all rows in single query with multiple id

I have a asset_request table with fields id and request_id. I want to select multiple rows with specific id $ids = $request->ids // 5,6
I want to select only 5th and 6th rows in request table

$ids = $request->ids;
$asset_requst=asset_request::whereIn('id',array($ids))->first(); //gets only 6th row.needto get both rows



from Laravel Questions and Answers https://laravelquestions.com/laravel/get-all-rows-in-single-query-with-multiple-id/
via Lzo Media

Comments

Popular posts from this blog

ng-include of inline SVG does not display gradient except in Chrome

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-show doesn’t work correct with value boolean