improve query for person based on tempid
This commit is contained in:
@@ -24,10 +24,20 @@ function booking_balance_page() {
|
|||||||
|
|
||||||
//work out the node id from the session id
|
//work out the node id from the session id
|
||||||
$query = db_select('booking_person', 'p');
|
$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->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
|
||||||
|
Reference in New Issue
Block a user