Function __global->build_content_where
Definitions
sources/database_search.php
- Build a full-text query WHERE clause from given content.
- 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 | The search query |
| $full_coverage | boolean | No | No | False | N/A | N/A | Whether we can assume we require full coverage (i.e. not substring matches) |
| $force_like | boolean | No | No | False | N/A | N/A | Whether to force LIKE syntax rather than full-text search |
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)
/**
* Build a full-text query WHERE clause from given content.
*
* @param string $search_query The search query
* @param boolean $full_coverage Whether we can assume we require full coverage (i.e. not substring matches)
* @param boolean $force_like Whether to force LIKE syntax rather than full-text search
* @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 build_content_where(string $search_query, bool $full_coverage = false, bool $force_like = false) : array
* Build a full-text query WHERE clause from given content.
*
* @param string $search_query The search query
* @param boolean $full_coverage Whether we can assume we require full coverage (i.e. not substring matches)
* @param boolean $force_like Whether to force LIKE syntax rather than full-text search
* @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 build_content_where(string $search_query, bool $full_coverage = false, bool $force_like = false) : array

