Thursday, January 7, 2016

Get customer data by selecting the particular field in magento

Get customer data by selecting the particular field in magento 
$collection = Mage::getModel('customer/customer')->getCollection();
    //$Collection->addFieldToSelect('email');
    $collection->getSelect()
    ->reset(Zend_Db_Select::COLUMNS)
    ->columns('email as cust_email')
    ->columns('created_at as create_time');
    echo '<pre>';
    print_r($collection->getData());

No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...