How do you select a list of records from the database where the record ids are in the $ids list?

Assume that $collection is a new instance of a class that extends
MagentoFrameworkModelResourceModelDbCollectionAbstractCollection, and $ids is an array of ids.
How do you select a list of records from the database where the record ids are in the $ids list?
A. $collection->addFieldToFilter(‘record_id’,[‘in’=>$ids]);
B.

C. $collection->in($ids);
D. $collection->filterIn($ids);

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “How do you select a list of records from the database where the record ids are in the $ids list?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.