function merci_reservation_items in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3
Same name and namespace in other branches
- 6.2 includes/database.inc \merci_reservation_items()
- 7.2 includes/database.inc \merci_reservation_items()
- @todo Please document this function.
See also
1 call to merci_reservation_items()
- MigrateSourceReservation::getNextRow in merci_migrate/
merci_reservation.inc - Implementation of MigrateSource::getNextRow().
File
- merci_migrate/
merci_line_item.inc, line 184
Code
function merci_reservation_items($node) {
$items = db_query("SELECT m.did, m.merci_item_status, merci_placeholder_nid, pn.title AS placeholder_title, merci_item_nid, tn.title AS item_title, nt.type, nt.name FROM {merci_reservation_detail} m INNER JOIN {node} pn ON m.merci_placeholder_nid = pn.nid INNER JOIN {node_type} nt ON pn.type = nt.type LEFT JOIN {node} tn ON m.merci_item_nid = tn.nid WHERE m.vid = :vid", array(
':vid' => $node->vid,
));
$reservation_items = array();
foreach ($items as $item) {
$item = (array) $item;
$reservation_items[$item['did']] = $item;
}
return $reservation_items;
}