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();
发表评论(评论将通过邮件发给作者):