You are here

function library_get_transaction_by_tid in Library 7

Same name and namespace in other branches
  1. 5.2 library.module \library_get_transaction_by_tid()
  2. 6.2 library.module \library_get_transaction_by_tid()
  3. 6 library.module \library_get_transaction_by_tid()

Retrieves a transaction by its id.

Parameters

int $tid: Transaction id to match.

Return value

null|array Array of transaction objects for a term if present.

1 call to library_get_transaction_by_tid()
library_transaction_view in ./library.pages.inc
View an individual transaction.

File

./library.module, line 951

Code

function library_get_transaction_by_tid($tid) {
  if (isset($tid) && is_numeric($tid)) {
    $select = library_get_transactions_query();
    $select
      ->condition('lt.tid', $tid);
    $transaction = $select
      ->execute()
      ->fetchAll();
    return $transaction;
  }
  else {
    return NULL;
  }
}