function tripal_views_integration_remove_entry_by_table_name

2.x tripal_views.DEPRECATED.inc tripal_views_integration_remove_entry_by_table_name($table_name, $priority)
1.x tripal_views.api.inc tripal_views_integration_remove_entry_by_table_name($table_name, $priority)

Removes a View Integration Entry

Parameters

$table_name: The name of the table to remove a views integration entry for

$priority: The priority of the of views integration entry

Return value

TRUE on Success; FALSE otherwise

Related topics

File

tripal_views/api/tripal_views.api.inc, line 432
API functions for Tripal Views Integration

Code

function tripal_views_integration_remove_entry_by_table_name($table_name, $priority) {

  $views = db_fetch_object(db_query(
  "SELECT * FROM {tripal_views} WHERE table_name='%s' AND priority=%d", 
  $table_name, 
  $priority
  ));
  if ($views->setup_id) {
    tripal_views_integration_remove_entry_by_setup_id($views->setup_id);
    return TRUE;
  }
  else {
    return FALSE;
  }

}