You are here

function library_get_transaction_by_tid in Library 6.2

Same name and namespace in other branches
  1. 5.2 library.module \library_get_transaction_by_tid()
  2. 6 library.module \library_get_transaction_by_tid()
  3. 7 library.module \library_get_transaction_by_tid()
1 call to library_get_transaction_by_tid()
library_transaction_view in ./library.pages.inc

File

./library.module, line 1064

Code

function library_get_transaction_by_tid($tid) {
  if (isset($tid) && is_numeric($tid)) {
    $result = db_fetch_object(db_query('SELECT lt.created, la.name as "action_name", la.status_change, u.uid, u.name as "username", n.title as "item_name", n.type as "item_type", lt.item_id as "item_id", lt.nid as "nid", lt.duedate, lt.notes FROM {library_transactions} lt, {library_actions} la, {users} u, {node} n WHERE la.aid = lt.action_aid AND u.uid = lt.uid AND n.nid = lt.nid AND lt.tid = %d', $tid));
    return $result;
  }
  else {
    return NULL;
  }
}