I have a problem with addAttributeToFilter() where it does not work as I expect.
$product = Mage::getModel('catalog/product'); ...snip... $simple_associated_collection = $product->getCollection() ->addAttributeToFilter('type_id', 'simple') ->addAttributeToFilter('sku',array('like'=>$configurable_product_sku.'_%')) ->load();
Passing at 4_% I expect to get
4_1 4_2
But I also get
42_1 420_1
The goal is to get a set of simple products so that I can associate them with their custom parent after import.
How to use LIKE to get the same results as in MySQL ?
source share