public function getBySpecification($specification) { $select = new select(); $select->from('measures'); $select->join('measures_types', 'measures_types.id = measures.measure_type', array('mt_name' => 'name'), $select::JOIN_LEFT); $select->join('specifications', 'specifications.id = measures.specification', array('s_name' => 'name')); $select->where(array($this->tableGateway->getTable() . '.specification' => $specification)); $resultSet = $this->tableGateway->selectWith($select); return $resultSet ? $resultSet : false; }
public function fetchAll() { $select = new select(); $select->from('categories'); $select->join('master_categories', 'master_categories.id = categories.master_category', array('master_category_name' => 'name')); $resultSet = $this->tableGateway->selectWith($select); $resultSet->buffer(); return $resultSet ? $resultSet : false; }
public function fetchAll() { $select = new select(); $select->from('specifications'); $select->join('specifications_masters', 'specifications_masters.id = specifications.specification_master', array('sm_name' => 'name')); $resultSet = $this->tableGateway->selectWith($select); $resultSet->buffer(); return $resultSet ? $resultSet : false; }