Wednesday, 20 June 2012

how to select only one particular field from model in zend framework

public function ParticularCol($whr,$group)

{

$select = $this->_db->select()

->from(array('tablename'), array('Col1','Col2')) // Required Change

->where($whr)

->group($group);//echo $select;die;

$result = $this->getAdapter()->fetchAll($select);

return $result;

}