You are here

public function DatabaseConnection_sqlsrv::escapeLike in Drupal driver for SQL Server and SQL Azure 7

Same name and namespace in other branches
  1. 7.3 sqlsrv/database.inc \DatabaseConnection_sqlsrv::escapeLike()
  2. 7.2 sqlsrv/database.inc \DatabaseConnection_sqlsrv::escapeLike()

Override of DatabaseConnection::escapeLike().

Overrides DatabaseConnection::escapeLike

File

sqlsrv/database.inc, line 207
Database interface code for Microsoft SQL Server.

Class

DatabaseConnection_sqlsrv

Code

public function escapeLike($string) {
  return preg_replace('/([\\[\\]%_])/', '[$1]', $string);
}