function tripal_feature_load_properties

1.x tripal_feature.module tripal_feature_load_properties($feature_id)

Related topics

File

tripal_feature/tripal_feature.module, line 1028
@todo Add file header description

Code

function tripal_feature_load_properties($feature_id) {

  $sql = "SELECT CVT.name as cvname, FS.type_id, FS.value, FS.rank,
           CVT.definition, CVT.is_obsolete,
           DBX.dbxref_id,DBX.accession,DB.name as dbname,
           DB.urlprefix, DB.description as db_description, DB.url
         FROM {featureprop} FS
           INNER JOIN {cvterm} CVT ON FS.type_id = CVT.cvterm_id
           INNER JOIN {dbxref} DBX ON CVT.dbxref_id = DBX.dbxref_id
           INNER JOIN {db} DB      ON DB.db_id = DBX.db_id
         WHERE FS.feature_id = %d
         ORDER BY FS.rank ASC";
  $results = chado_query($sql, $feature_id);
  $i = 0;
  $properties = array();
  while ($property = db_fetch_object($results)) {
    $properties[$i++] = $property;
  }
  return $properties;
}