Load all event fields, so we know we have them deeper in the code.

This commit is contained in:
Isaac Connor 2016-04-01 14:07:27 -04:00
parent 9493e99587
commit 5f6d140de5
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ if ( !empty($_REQUEST['execute']) )
} }
$countSql = 'SELECT count(E.Id) AS EventCount FROM Monitors AS M INNER JOIN Events AS E ON (M.Id = E.MonitorId) WHERE'; $countSql = 'SELECT count(E.Id) AS EventCount FROM Monitors AS M INNER JOIN Events AS E ON (M.Id = E.MonitorId) WHERE';
$eventsSql = 'SELECT E.Id,E.StorageId,E.MonitorId,M.Name AS MonitorName,M.DefaultScale,E.Name,E.Width,E.Height,E.Cause,E.Notes,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived FROM Monitors AS M INNER JOIN Events AS E on (M.Id = E.MonitorId) WHERE'; $eventsSql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultScale FROM Monitors AS M INNER JOIN Events AS E on (M.Id = E.MonitorId) WHERE';
if ( $user['MonitorIds'] ) { if ( $user['MonitorIds'] ) {
$user_monitor_ids = ' M.Id in ('.$user['MonitorIds'].')'; $user_monitor_ids = ' M.Id in ('.$user['MonitorIds'].')';
$countSql .= $user_monitor_ids; $countSql .= $user_monitor_ids;