function tripal_get_chado_custom_schema
2.x tripal_core.DEPRECATED.api.inc | tripal_get_chado_custom_schema($table) |
3.x tripal_core.DEPRECATED.inc | tripal_get_chado_custom_schema($table) |
1.x tripal_core_chado.api.inc | tripal_get_chado_custom_schema($table) |
Retrieves the schema in an array for the specified custom table.
Parameters
$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
1 call to tripal_get_chado_custom_schema()
- tripal_core_get_chado_table_schema in tripal_core/
api/ tripal_core_chado.api.inc - Retrieves the chado tables Schema API array.
File
- tripal_core/
api/ tripal_core_chado.api.inc, line 3374 - The Tripal Core API
Code
function tripal_get_chado_custom_schema($table) {
$sql = "SELECT schema FROM {tripal_custom_tables} WHERE table_name = '%s'";
$custom = db_fetch_object(db_query($sql, $table));
if (!$custom) {
return FALSE;
}
else {
return unserialize($custom->schema);
}
}