improve query for person based on tempid
This commit is contained in:
@@ -21,14 +21,24 @@ function booking_balance_page() {
|
|||||||
|
|
||||||
//TODO: if the person says they're married, query to see if they're listed partner has already registered and paid
|
//TODO: if the person says they're married, query to see if they're listed partner has already registered and paid
|
||||||
//if they have, then let the new registration person know their partner has already paid, and send them the confirmation email
|
//if they have, then let the new registration person know their partner has already paid, and send them the confirmation email
|
||||||
|
|
||||||
//work out the node id from the session id
|
//work out the node id from the session id
|
||||||
|
$query = db_select('booking_person', 'p');
|
||||||
|
$db_and = db_and()->condition('p.booking_eventid', $event->eid, '=')
|
||||||
|
->condition('p.booking_tempid', arg(1), '=');
|
||||||
|
$query->condition($db_and);
|
||||||
|
$query->fields('p', array('nid'));
|
||||||
|
$person = $query->execute()
|
||||||
|
->fetchObject();
|
||||||
|
|
||||||
|
/*
|
||||||
$query = db_select('booking_person', 'p');
|
$query = db_select('booking_person', 'p');
|
||||||
$query->condition('p.booking_tempid', arg(1), '=')
|
$query->condition('p.booking_tempid', arg(1), '=')
|
||||||
->fields('p', array('nid'));
|
->fields('p', array('nid'));
|
||||||
$person = $query->execute()
|
$person = $query->execute()
|
||||||
->fetchObject();
|
->fetchObject();
|
||||||
|
*/
|
||||||
|
|
||||||
if ($person) {
|
if ($person) {
|
||||||
//load all the fields
|
//load all the fields
|
||||||
$node = node_load($person->nid);
|
$node = node_load($person->nid);
|
||||||
|
Reference in New Issue
Block a user