original_string: public function getSurveysFor($organizationId)
      {
          if ($organizationId !== null) {
              $where = "AND EXISTS (SELECT 1 FROM gems__rounds
                  INNER JOIN gems__tracks ON gro_id_track = gtr_id_track
                  WHERE gro_id_survey = gsu_id_survey AND
                  gtr_organizations LIKE '%|" . (int) $organizationId . "|%')";
          } else {
              $where = "";
          }
  
          $sql = "SELECT gsu_id_survey, gsu_survey_name FROM gems__surveys WHERE gsu_active = 1 " .
              $where . " ORDER BY gsu_survey_name ASC";
  
          return $this->_getSelectPairsCached(__FUNCTION__. '_' . $organizationId, $sql, array(), 'surveys');
      }
code: public function getSurveysFor($organizationId)
      {
          if ($organizationId !== null) {
              $where = "AND EXISTS (SELECT 1 FROM gems__rounds
                  INNER JOIN gems__tracks ON gro_id_track = gtr_id_track
                  WHERE gro_id_survey = gsu_id_survey AND
                  gtr_organizations LIKE '%|" . (int) $organizationId . "|%')";
          } else {
              $where = "";
          }
  
          $sql = "SELECT gsu_id_survey, gsu_survey_name FROM gems__surveys WHERE gsu_active = 1 " .
              $where . " ORDER BY gsu_survey_name ASC";
  
          return $this->_getSelectPairsCached(__FUNCTION__. '_' . $organizationId, $sql, array(), 'surveys');
      }
code_tokens: public function getSurveysFor ( $ organizationId ) { if ( $ organizationId !== null ) { $ where = "AND EXISTS (SELECT 1 FROM gems__rounds
                  INNER JOIN gems__tracks ON gro_id_track = gtr_id_track
                  WHERE gro_id_survey = gsu_id_survey AND
                  gtr_organizations LIKE '%|" . ( int ) $ organizationId . "|%')" ; } else { $ where = "" ; } $ sql = "SELECT gsu_id_survey, gsu_survey_name FROM gems__surveys WHERE gsu_active = 1 " . $ where . " ORDER BY gsu_survey_name ASC" ; return $ this -> _getSelectPairsCached ( __FUNCTION__ . '_' . $ organizationId , $ sql , array ( ) , 'surveys' ) ; }
docstring: Get all the surveys for a certain organization id
  
  @param int $organizationId
  @return array survey id => survey name
docstring_tokens: Get all the surveys for a certain organization id