Function __global->db_like_assemble

Definitions

sources/database_search.php

  • Generate SQL for a boolean search.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$search_query string No No required parameter N/A N/A Boolean search string
$full_coverage boolean No No False N/A N/A Whether we can assume we require full coverage

Returns

  • A tuple (any SQL component may be blank): The combined where clause SQL, the boolean operator, body where clause SQL, positive where clause SQL, negative where clause SQL
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate SQL for a boolean search.
 *
 * @param  string $search_query Boolean search string
 * @param  boolean $full_coverage Whether we can assume we require full coverage
 * @return array A tuple (any SQL component may be blank): The combined where clause SQL, the boolean operator, body where clause SQL, positive where clause SQL, negative where clause SQL
 */

function db_like_assemble(string $search_query, bool $full_coverage = false) : array