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
Zurück zum Beitrag

Versionen 3

vor 3 Jahren
Jan Zimmerbeutel
272 × 4 Administrator
Wie komme ich per PHP an alle User in einer Rolle?
Wie komme ich per PHP an alle User in einer Rolle?
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']; } ```
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']; } ```
vor 3 Jahren
Jan Zimmerbeutel
272 × 4 Administrator
Wie komme ich per PHP an alle User in einer Rolle?
Wie komme ich per PHP an alle User in einer Rolle?
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']; } ```
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']; }
vor 3 Jahren
Original
Jan Zimmerbeutel
272 × 4 Administrator
Wie komme ich per PHP an alle User in einer Rolle?

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']; }