function tripal_views_get_setup_id

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

Retrieve the views integration setup with the given priority/table combination

Parameters

$table_name: The name of the table to retrieve the setup ID for. This can be either a materialized view or a chado table

$priority: The priority of the integration to retrieve the setup_id for

Return value

On success, the setup_id to use for integration of this table; otherwise FALSE

Related topics

1 call to tripal_views_get_setup_id()
tripal_views_clone_integration in tripal_views/api/tripal_views.api.inc
Clone an integration

File

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

Code

function tripal_views_get_setup_id($table_name, $priority) {

  $sql = "SELECT setup_id FROM {tripal_views} WHERE table_name='%s' AND priority=%d ORDER BY priority ASC";
  $setup = db_fetch_object(db_query($sql, $table_name, $priority));
  if ($setup) {
    return $setup->setup_id;
  }
  else {
    return FALSE;
  }
}