function chado_get_custom_table_schema

2.x chado_get_custom_table_schema($table)

Retrieves the schema in an array for the specified custom table.


$table: The name of the table to create.

Return value

A Drupal-style Schema API array definition of the table. Returns FALSE on failure.

Related topics

2 calls to chado_get_custom_table_schema()
chado_get_schema in tripal_core/api/
Retrieves the chado tables Schema API array.
tripal_get_chado_custom_schema in tripal_core/api/
1 string reference to 'chado_get_custom_table_schema'


tripal_core/api/, line 509


function chado_get_custom_table_schema($table) {

  $sql = "SELECT schema FROM {tripal_custom_tables} WHERE table_name = :table_name";
  $results = db_query($sql, array(':table_name' => $table));
  $custom = $results->fetchObject();
  if (!$custom) {
    return FALSE;
  else {
    return unserialize($custom->schema);