function tripal_get_mview_id

2.x tripal_get_mview_id($view_name)

Retrieve the materialized view_id given the name


$view_name: The name of the materialized view

Return value

The unique identifier for the given view

Related topics

4 calls to tripal_get_mview_id()
1 string reference to 'tripal_get_mview_id'


tripal_core/api/, line 291
Provides an application programming interface (API) to manage materialized views in Chado.


function tripal_get_mview_id($view_name) {
  if (db_table_exists('tripal_mviews')) {
    $sql = "SELECT * FROM {tripal_mviews} WHERE name = :name";
    $results = db_query($sql, array(':name' => $view_name));
    $mview = $results->fetchObject();
    if ($mview) {
      return $mview->mview_id;

  return FALSE;