Join in zend framework

public function getFilteredCustomers($search_text) {
$customers = array('cid', 'esid', 'name', 'broker_code');
$broker_new = array('company_name');
$select = $this->select()
->setIntegrityCheck(false)
->from(array('c' => 'customer'), $customers);
$select->join(array('b' => 'broker_new'), 'c.broker_code=b.broker_code', $broker_new);
$select->where('c.name LIKE ?', $search_text.'%');
$select->where('c.status = ?', 1);
return $this->fetchAll($select);
}

Share This: