You are here

function globallink_beans_get_row_id_from_submission in GlobalLink Connect for Drupal 7.6

Gets beans row ID from submission details.

Parameters

string $submission_ticket: The submission ticket.

string $document_ticket: The document ticket.

string $target_locale: The target locale.

Return value

The beans row ID. FALSE if the row doesn't exist.

1 call to globallink_beans_get_row_id_from_submission()
globallink_beans_receive_form in globallink_beans/globallink_beans_receive.inc
Builds form to receive a beans submission.

File

globallink_beans/globallink_beans.inc, line 923

Code

function globallink_beans_get_row_id_from_submission($submission_ticket, $document_ticket, $target_locale) {
  $query = db_select('globallink_core_beans', 'gcb');
  $query
    ->condition('submission_ticket', $submission_ticket, '=');
  $query
    ->condition('document_ticket', $document_ticket, '=');
  $query
    ->condition('target', $target_locale, '=');
  $query
    ->fields('gcb');
  $results = $query
    ->execute();
  foreach ($results as $row) {
    return $row->rid;
  }
  return FALSE;
}