I am trying to get the user orders history, used the following query and its working fine. But its returning all the order related fields from table
$collection = Mage::getModel("sales/order")->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('customer_id', 400) ->setOrder('created_at', 'desc');
I want to fetch only particular fields, so in case of ->addAttributeToSelect('*')
used the following code ->addAttributeToSelect(array('created_at','customer_id','increment_id','updated_at','status','entity_id','state'))
But getting error as "Cannot determine the field name."