function tripal_cv_get_cvterm_by_id
2.x tripal_cv.DEPRECATED.inc | tripal_cv_get_cvterm_by_id($cvterm_id) |
3.x tripal_cv.DEPRECATED.inc | tripal_cv_get_cvterm_by_id($cvterm_id) |
1.x tripal_cv.api.inc | tripal_cv_get_cvterm_by_id($cvterm_id) |
Retrieve a chado cvterm object with a given name
Parameters
$cvterm_id: the cvterm.cvterm_id
Return value
cvterm array or FALSE on error
Related topics
3 calls to tripal_cv_get_cvterm_by_id()
- chado_pub_insert in tripal_pub/
tripal_pub.module - Implementation of tripal_pub_insert().
- chado_pub_update in tripal_pub/
tripal_pub.module - chado_pub_validate in tripal_pub/
includes/ pub_form.inc
File
- tripal_cv/
api/ tripal_cv.api.inc, line 196 - Controlled Vocabulary API
Code
function tripal_cv_get_cvterm_by_id($cvterm_id) {
if (!is_numeric($cvterm_id)) {
return FALSE;
}
$values = array('cvterm_id' => $cvterm_id);
$options = array('statement_name' => 'sel_cvterm_id');
$r = tripal_core_chado_select('cvterm', array('*'), $values, $options);
if (!$r) {
return FALSE;
}
return $r[0];
}