public static function SuggestionStorage::getAllSuggestions in Autocomplete Search Suggestions 7
Fetch all the suggestions.
Parameters
int $start: The starting offset.
int $limit: The query limit.
Return value
array An array of suggestion objects.
1 call to SuggestionStorage::getAllSuggestions()
- suggestion_admin_search_form in ./
suggestion.admin.inc - Menu callback to index suggestions.
File
- src/
SuggestionStorage.php, line 40 - CRUD methods for the suggestion module.
Class
- SuggestionStorage
- Database CRUD.
Code
public static function getAllSuggestions($start = NULL, $limit = 100) {
if (is_numeric($start) && intval($limit)) {
return db_query_range("SELECT * FROM {suggestion} ORDER BY ngram ASC", $start, $limit)
->fetchAll();
}
return db_query("SELECT * FROM {suggestion} ORDER BY ngram ASC")
->fetchAll();
}