protected function _getCat3($cat2 = null) { $refcat3 = new Refcategory(); $select = $refcat3->select(); $select->where('SubPrimCatId = (select CONCAT( PrimID, SetID) from ref_category_en where id = ?)', $cat2); return $this->_cat3 = $refcat3->fetchAll($select); }
protected function _getCat3($cat2 = null) { $refcat3 = new Refcategory(); $select = $refcat3->select(); if ($cat2 == 'Any' || $cat2 == 'All') { $select->where('busPostTypeId = ? and SubPrimCatId is not null', $this->_busTypeId); } else { $select->where('SubPrimCatId = (select CONCAT( PrimID, SetID) from ref_category_en where id = ?)', $cat2); } logfire('car cat3 ', $select); return $this->_cat3 = $refcat3->fetchAll($select); }