0

I am trying to get the result of this query

select entity_id, value
from catalog_product_entity_int
where attribute_id = 191
  AND value = 3;

is it possible to get the results of a query like this via product collection? if not, what other alternative can I resort to?

Ive tried this

    public function GetChildren($value)
    {
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*');
        $collection->addAttributeToFilter('attribute_id', '191');
        $collection->addFieldToFilter('value', $value);
        return $collection;
    }

but it didn't work because I realized that this product collection is only reading from "catalog_product_entity". TIA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.