function tripal_contact_sync_contacts

1.x contact_sync.inc tripal_contact_sync_contacts($job_id = NULL)

Related topics

3 calls to tripal_contact_sync_contacts()
1 string reference to 'tripal_contact_sync_contacts'

File

tripal_contact/includes/contact_sync.inc, line 36

Code

function tripal_contact_sync_contacts($job_id = NULL) {

  // get the list of contacts that have not yet been synced
  // and ignore the default 'NULL' contact. we don't want
  // to sync that one.
  $sql = "
    SELECT C.*
    FROM chado.contact C
      LEFT JOIN {chado_contact} CP ON CP.contact_id = C.contact_id
    WHERE CP.contact_id IS NULL
  ";
  $results = db_query($sql);

  while ($contact = db_fetch_object($results)) {
    $node = tripal_contact_sync_contact($contact);
  }
}