コード例 #1
0
 /**
  * Gets the sequence id for the next search entry.
  *
  * @return int The id to be used as the next sequence id for storing the last search keywords.
  */
 protected function getNextSequenceId()
 {
     $nextSequenceId = 0;
     $numberOfLastSearchesToLog = (int) $this->configuration->getSearchLastSearchesLimit();
     $row = $this->database->exec_SELECTgetRows('(sequence_id + 1) % ' . $numberOfLastSearchesToLog . ' as next_sequence_id', 'tx_solr_last_searches', '', '', 'tstamp DESC', 1);
     if (!empty($row)) {
         $nextSequenceId = $row[0]['next_sequence_id'];
     }
     return $nextSequenceId;
 }