Skip to content

Instantly share code, notes, and snippets.

@sidharrell
Created December 23, 2013 23:06
Show Gist options
  • Select an option

  • Save sidharrell/8106350 to your computer and use it in GitHub Desktop.

Select an option

Save sidharrell/8106350 to your computer and use it in GitHub Desktop.
fix for timeslot reg limit time selector dropdown count
// replaces lines 183-192 of includes/functions/time_date.php:
$SQL .= "( SELECT COALESCE( (SELECT sum(quantity) FROM " . EVENTS_ATTENDEE_TABLE . " ATT ";
$SQL .= "WHERE ATT.event_id= %d ";
$SQL .= "AND ATT.payment_status != 'Incomplete' ";
$SQL .= "AND ATT.event_time = ESE.start_time ";
$SQL .= "AND ATT.end_time = ESE.end_time), 0 ) ) ";
$SQL .= ") AS available_spaces ";
$SQL .= "FROM " . EVENTS_START_END_TABLE . " ESE ";
$SQL .= "WHERE ESE.event_id= %d ";
$SQL .= "GROUP BY ESE.id ";
$SQL .= "ORDER BY ESE.start_time";var_dump($SQL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment