_db->select(); $select->from($this->_getPair(null, 'years'), array('premium.monthlyPremium')); $select->join( $this->_getPair('MinnesotaCarePremium', 'premium'), 'years.id = premium.yearId', array() ); $select->where('years.year = ?', $year, Qs_Db::INT_TYPE); $select->where('premium.fpg > ?', $fpg, Qs_Db::INT_TYPE); $select->order('fpg'); return $this->_db->fetchOne($select); } }