I am using following update query, $db = Mage::getSingleton('core/resource')->getConnection('core_write'); $query = UPDATE `catalog_product_entity_decimal` val SET val.value = '11' WHERE val.attribute_id = 75 AND val.entity_id = (select cv.entity_id from `catalog_product_entity` as cv where cv.sku = '25' limit 1) $afected = $db->query($query); How could I get the affected rows count from the above query?. I have already looked on the http://magento.stackexchange.com/questions/10623/how-do-i-get-the-mysql-affected-rows-using-the-magento-resource - but those not works for me. Kindly advice me on the above.