I'm attempting to retrieve the entire column of both kit_sku
and related_sku
. However, it doesn't seem to parse correctly. Both $componentSkus
and $componentRequiredQuantity
are returning identical arrays.
$kitCollection = Mage::getModel('path/path')
->getCollection()
->addFieldToFilter('kit_sku', $sku)
->setOrder('related_sku', 'ASC');
$select = $kitCollection->getSelect();
$select->reset(Zend_Db_Select::COLUMNS)
->distinct()
->columns('related_sku')
->columns('required_quantity');
$connection = $kitCollection->getConnection();
$componentSkus = $connection->fetchCol($select, 0);
$componentRequiredQuantity = $connection->fetchCol($select, 1);