I have a weird issue going on where I’m getting null:null pairs (but always the correct number of pairs) when I’m trying to load options into a Scheduler lightbox’s select. I know the SQL query works and returns valid data. And since the correct number of pairs are returned, that tells me that the SQL query is working, just returning “null” for the value and label.
Here’s the PHP code for the scheduler load call:
$resources = filter_input(INPUT_GET,"resources");
$sql = "SELECT EmployeeID,CONCAT(LastName,', ',FirstName) AS Name FROM ".$employeeDB.".EmployeeMaster "
. "WHERE EmployeeID IN "
. "(SELECT EmployeeID FROM ".$infosysDB.".ResourceScheduler_Permissions "
. "INNER JOIN ".$infosysDB.".ResourceScheduler_Resources ON ResourceScheduler_Permissions.ResourceID = ResourceScheduler_Resources.ResourceID "
. "WHERE ResourceGroup NOT IN (SELECT GroupID FROM ".$infosysDB.".ResourceScheduler_Groups WHERE GroupText = 'Administration'))"
;
$organizer = new OptionsConnector($mysqli,"MySQLi");
$organizer->render_complex_sql($sql,"EmployeeID","EmployeeID,Name");
$sql = "SELECT reservations.*, "
. "resources.ResourceName,resources.Location,resources.EventBackColor,resources.EventTextColor "
. "FROM ResourceScheduler_Reservations reservations "
. "INNER JOIN ResourceScheduler_Resources resources ON reservations.ResourceID = resources.ResourceID "
. "WHERE resources.ResourceID IN (".$resources.") "
. "AND resources.Status = 'Active' "
;
$scheduler = new SchedulerConnector($mysqli,"MySQLi");
$scheduler->set_options("organizer",$organizer);
$scheduler->event->attach(new EventDataHandler());
$scheduler->render_sql($sql,"ReservationID","StartDate,EndDate,Title,ReservedBy,Notes,ResourceName,Location,EventBackColor,EventTextColor");