fix query

This commit is contained in:
Nathan Coad
2018-05-02 11:29:50 +10:00
parent 340cfa503d
commit c1957a6c83

View File

@@ -35,11 +35,14 @@ function booking_variety_regn_form($node, &$form_state)
), ),
); );
//for each entry in the variety timeslot table, create a new form select item //for each entry in the variety timeslot table, create a new form select item
$result = db_query("SELECT * from {booking_variety_times}"); $timeslot_query = db_select('booking_variety_times', 'v');
$timeslot_query->condition('v.booking_eventid', $event->eid, '=')
->fields('v')
->orderBy('v.booking_variety_start');
$result = $timeslot_query->execute();
foreach($query as $timeslot) foreach($result as $timeslot) {
{
//reset the array //reset the array
$options = array (); $options = array ();
$options[''] = ''; $options[''] = '';