Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Beantwortet
Wie komme ich per PHP an alle User in einer Rolle?

Stimmen Neuste

Antworten


Hier eine Funktion, die genau dies erledigt:

private function fetchUsersFromJobfunction($jobfunction) {
    $sql = 'SELECT DISTINCT username FROM JRUSERJOB where jobfunction=?';
    $parameterValues = [$jobfunction];
		$parameterTypes = [JobRouter\Common\Database\ConnectionInterface::TYPE_TEXT]
    $res = $jobDB->preparedSelect($sql, $parameterValues, $parameterTypes);
    return $res;
}

Danach dann das result processing, z.B. mit einer while-Schleife:

$usersInFunctionAccounting = [];
$jobfunction = 'Accounting';
$result = fetchUsersFromJobfunction($jobfunction)

while($row = $jobDB->fetchRow($result)) {
				$usersInFunctionAccounting[] = $row['username'];
}
  
  
Gepostet vor 3 Jahren
Bearbeitet vor 3 Jahren
Jan Zimmerbeutel
272 × 4 Administrator
5K Ansichten
1 Antwort
vor 3 Jahren
vor 3 Jahren
Stichwörter