function db_like


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 db_like($string)
cle7 db_like($string)
elmsmedia7 db_like($string)
icor7 db_like($string)
meedjum_blog7 db_like($string)
mooc7 db_like($string)

Escapes characters that work as wildcard characters in a LIKE pattern.

The wildcard characters "%" and "_" as well as backslash are prefixed with a backslash. Use this to do a search for a verbatim string without any wildcard behavior.

For example, the following does a case-insensitive query for all rows whose name starts with $prefix:

$result = db_query(
  'SELECT * FROM person WHERE name LIKE :pattern',
  array(':pattern' => db_like($prefix) . '%')

Backslash is defined as escape character for LIKE patterns in DatabaseCondition::mapConditionOperator().


$string: The string to escape.

Return value

The escaped string.

Related topics

53 calls to db_like()
advagg_admin_get_file_info in sites/all/modules/ulmus/advagg/
Get detailed info about the given filename.
advagg_cleanup_semaphore_table in sites/all/modules/ulmus/advagg/
Delete orphaned/expired advagg locks from the semaphore database table.
boost_uninstall in sites/all/modules/ulmus/boost/boost.install
Implements hook_uninstall().
ckeditor_link_ckeditor_link_i18n_menu_autocomplete in sites/all/modules/ulmus/ckeditor_link/includes/
Implementation of hook_ckeditor_link_TYPE_autocomplete().
ckeditor_link_ckeditor_link_i18n_taxonomy_autocomplete in sites/all/modules/ulmus/ckeditor_link/includes/
Implementation of hook_ckeditor_link_TYPE_autocomplete().

... See full list


includes/database/, line 2610
Core systems for the database layer.


function db_like($string) {
  return Database::getConnection()->escapeLike($string);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.