芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/sommatv/lib/Upgrade/ScheduleConvertStep.php
store = $store; $this->log = $log; $this->config = $config; } /** * @param \Slim\Helper\Set $container * @throws \Xibo\Exception\NotFoundException */ public function doStep($container) { // Get all events and their Associated display group id's foreach ($this->store->select('SELECT eventId, displayGroupIds FROM `schedule`', []) as $event) { // Ping open the displayGroupIds $displayGroupIds = explode(',', $event['displayGroupIds']); // Construct some SQL to add the link $sql = 'INSERT INTO `lkscheduledisplaygroup` (eventId, displayGroupId) VALUES '; foreach ($displayGroupIds as $id) { $sql .= '(' . $event['eventId'] . ',' . $id . '),'; } $sql = rtrim($sql, ','); $this->store->update($sql, []); } } }