function tripal_stock_update_db_reference

1.x tripal_stock-db_references.inc tripal_stock_update_db_reference($dbxref_id, $database_id, $accession)

Updates a Database Reference

@todo Make this function more generic ie: update all parts of the dbxref and db

Parameters

$dbxref_id: The unique chado identifier of the database reference to be updated

$database_id: The new database ID

$accession: The new accession

Related topics

1 call to tripal_stock_update_db_reference()
tripal_stock_edit_ALL_db_references_form_submit in tripal_stock/includes/tripal_stock-db_references.inc
Implements hook_form_submit(): Actually edits the database references

File

tripal_stock/includes/tripal_stock-db_references.inc, line 349
@todo Add file header description

Code

function tripal_stock_update_db_reference($dbxref_id, $database_id, $accession) {

  chado_query(
  "UPDATE {dbxref} SET db_id=%d, accession='%s' WHERE dbxref_id=%d", 
  $database_id, 
  $accession, 
  $dbxref_id
  );

}