Function Forum_driver_wbb22->get_username_sort_query

Definitions

sources/forum/wbb22.php

  • Returns the SQL query to use in an ORDER BY when sorting by a member (actually, username, but we only know the ID).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$field ID_TEXT No No required parameter N/A N/A The name of the r.* field containing the member ID
$use_displayname boolean No No False N/A N/A Whether we want the display name instead of the username

Returns

  • The SQL query (null: this driver does not support sorting by member)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Returns the SQL query to use in an ORDER BY when sorting by a member (actually, username, but we only know the ID).
 *
 * @param  ID_TEXT $field The name of the r.* field containing the member ID
 * @param  boolean $use_displayname Whether we want the display name instead of the username
 * @return ?string The SQL query (null: this driver does not support sorting by member)
 */

public function get_username_sort_query(string $field, bool $use_displayname = false) : ?string