magento get distinct Data by sql

piaoling  2011-06-20 11:26:21

           $order =Mage::getModel('sales/order')->getCollection()->addAttributeToSelect('pp_souche')->distinct(true)->getSelect();
            $query = (string) $order;
            var_dump($query);
            $row = Mage::getSingleton('core/resource')->getConnection('core_read')->query($query)->fetchAll();

类别 :  magento(258)  |  浏览(3289)  |  评论(0)
发表评论(评论将通过邮件发给作者):

Email: