db_query("DELETE FROM multisite_drupal_search_sites WHERE site_id = %d", $site_id);
  db_query("DELETE FROM multisite_drupal_search_dataset WHERE subdmn_id = '%s'",$subdmn_id);
  db_query("DELETE FROM multisite_drupal_search_index WHERE subdmn_id = '%s'",$subdmn_id); 

Drupal coding standards demand that table names be wrapped in curly braces:

  db_query("DELETE FROM {multisite_drupal_search_sites} WHERE site_id = %d", $site_id);
  db_query("DELETE FROM {multisite_drupal_search_dataset} WHERE subdmn_id = '%s'",$subdmn_id);
  db_query("DELETE FROM {multisite_drupal_search_index} WHERE subdmn_id = '%s'",$subdmn_id); 

Unless you have an exceptionally compelling reason to bypass prefixing, in which case it should be documented.

Comments

phdhiren’s picture

Status: Active » Closed (works as designed)

Actually, the data from all sites are gathered in these three table. so it will be common for all sites. If we add curly bracket then the individual site's prefix would be there before table name.

Is there any other way around to avoid prefix problem?