start implementing stored waiting list position
This commit is contained in:
@@ -236,6 +236,26 @@ function _booking_get_waitinglist_top()
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to retrieve all the people on the waiting list
|
||||
*/
|
||||
function _booking_get_waitinglist()
|
||||
{
|
||||
global $event;
|
||||
|
||||
// Taken from the Waiting List page, not very optimised
|
||||
$result = db_query('SELECT DISTINCT nid, booking_firstname, booking_lastname, booking_state, booking_readinggroup, booking_country, booking_status
|
||||
FROM (
|
||||
SELECT p.nid, p.booking_firstname, p.booking_lastname, p.booking_state, p.booking_country, p.booking_readinggroup, pay.booking_payment_date, p.booking_status
|
||||
FROM {booking_person} p, {booking_payment} pay
|
||||
WHERE p.booking_eventid = :eid and p.nid = pay.booking_person_nid and ( p.booking_status = 2 or p.booking_status = 4)
|
||||
) AS booking
|
||||
ORDER BY booking_status, booking_payment_date',
|
||||
array(':eid' => $event->eid));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to update the status of a registration
|
||||
*/
|
||||
|
Reference in New Issue
Block a user