I have filed 'read' in alireza_checkingout_checkingout table I want to add condition if read =0 in query below, I alreadt tried ->addFieldToFilter( 'read', array('eq' => 0))
but the system return erro "talan error: Call to a member function getBackend() on boolean in /var/www/html/megadump/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816" "fatal error: Call to a member function getBackend() on boolean in /var/www/html/megadump/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816"
$collection = Mage::getResourceModel('customer/customer_collection')
->addNameToSelect()
->addAttributeToSelect('email')
->addAttributeToSelect('created_at')
->addAttributeToSelect('group_id')
->joinTable('alireza_checkingout_checkingout','alireza_customer_id=entity_id',array('alireza_customer_id','read'),null,'left')
->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');
$collection->getSelect()->columns('count(alireza_customer_id) as cc')->group('entity_id');
$this->setCollection($collection);
return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();