original_string: public function getSurveysByCode($code)
      {
          $cacheId = __CLASS__ . '_' . __FUNCTION__ . '_' . $code;
  
          if ($results = $this->cache->load($cacheId)) {
              return $results;
          }
  
          $select = $this->db->select();
          $select->from('gems__surveys', array('gsu_id_survey', 'gsu_survey_name'))
                  ->where("gsu_code = ?", $code)
                  ->where("gsu_active = 1")
                  ->order('gsu_survey_name');
  
          $results = $this->db->fetchPairs($select);
          $this->cache->save($results, $cacheId, array('surveys'));
          return $results;
      }
code: public function getSurveysByCode($code)
      {
          $cacheId = __CLASS__ . '_' . __FUNCTION__ . '_' . $code;
  
          if ($results = $this->cache->load($cacheId)) {
              return $results;
          }
  
          $select = $this->db->select();
          $select->from('gems__surveys', array('gsu_id_survey', 'gsu_survey_name'))
                  ->where("gsu_code = ?", $code)
                  ->where("gsu_active = 1")
                  ->order('gsu_survey_name');
  
          $results = $this->db->fetchPairs($select);
          $this->cache->save($results, $cacheId, array('surveys'));
          return $results;
      }
code_tokens: public function getSurveysByCode ( $ code ) { $ cacheId = __CLASS__ . '_' . __FUNCTION__ . '_' . $ code ; if ( $ results = $ this -> cache -> load ( $ cacheId ) ) { return $ results ; } $ select = $ this -> db -> select ( ) ; $ select -> from ( 'gems__surveys' , array ( 'gsu_id_survey' , 'gsu_survey_name' ) ) -> where ( "gsu_code = ?" , $ code ) -> where ( "gsu_active = 1" ) -> order ( 'gsu_survey_name' ) ; $ results = $ this -> db -> fetchPairs ( $ select ) ; $ this -> cache -> save ( $ results , $ cacheId , array ( 'surveys' ) ) ; return $ results ; }
docstring: Get all the surveys for a certain code
  
  @param string $code
  @return array survey id => survey name
docstring_tokens: Get all the surveys for a certain code