Function Database_super_sqlserver->encode_like

Definitions

sources/database/shared/sqlserver.php

  • Encode a LIKE string comparison fragment for the database system. The pattern is a mixture of characters and _ and % wildcard symbols.Regular string escaping is also applied so that you can put the output directly between quotes.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$pattern string No No required parameter N/A N/A The pattern

Returns

  • The encoded pattern
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Encode a LIKE string comparison fragment for the database system. The pattern is a mixture of characters and _ and % wildcard symbols.Regular string escaping is also applied so that you can put the output directly between quotes.
 *
 * @param  string $pattern The pattern
 * @return string The encoded pattern
 */

public function encode_like(string $pattern) : string