- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
$SQL = "SELECT rq.*, c.login, r.name as raceName,
IF(rq.status = 1, '<span style=\'color:green\'>".$this->kernel->msg->get('raceRequest.status.done')."</span>',
IF(rq.status = -1, '<span style=\'color:red\'>".$this->kernel->msg->get('raceRequest.status.cancel')."</span>',
'".$this->kernel->msg->get('raceRequest.status.request')."')) as statusMsg,
IF(rq.currentLevel = 1, '<span style=\'color:#eeb300\'>".$this->kernel->msg->get('raceRequest.level.gold')."</span>',
IF(rq.currentLevel = 2, '<span style=\'color:#c6cccd\'>".$this->kernel->msg->get('raceRequest.level.silver')."</span>',
'<span style=\'color:#d58b72\'>".$this->kernel->msg->get('raceRequest.level.bronzet')."</span>')) as currentLevelMsg,
IF(rq.requestLevel = 1, '<span style=\'color:#eeb300\'>".$this->kernel->msg->get('raceRequest.level.gold')."</span>',
IF(rq.requestLevel = 2, '<span style=\'color:#c6cccd\'>".$this->kernel->msg->get('raceRequest.level.silver')."</span>',
'<span style=\'color:#d58b72\'>".$this->kernel->msg->get('raceRequest.level.bronzet')."</span>')) as requestLevelMsg
FROM raceRequests rq
LEFT JOIN customers c ON c.ID = rq.customerID
LEFT JOIN races r ON r.ID = rq.raceID
WHERE rq.ID = '%ID'";