Fix SQL for loading events

This commit is contained in:
Isaac Connor 2015-12-21 14:43:55 -05:00
parent c03088e1b5
commit 99f9145cdd
1 changed files with 2 additions and 2 deletions

View File

@ -182,11 +182,11 @@ sub Sql {
my $self = $_[0]; my $self = $_[0];
if ( ! $$self{Sql} ) { if ( ! $$self{Sql} ) {
my $filter_expr = ZoneMinder::General::jsonDecode( $self->{Query} ); my $filter_expr = ZoneMinder::General::jsonDecode( $self->{Query} );
my $sql = "SELECT E.*, my $sql = "SELECT *,
M.Name as MonitorName, M.Name as MonitorName,
M.DefaultRate, M.DefaultRate,
M.DefaultScale, M.DefaultScale,
unix_timestamp(E.StartTime) as Time, unix_timestamp(E.StartTime) as Time
FROM Events as E FROM Events as E
INNER JOIN Monitors as M on M.Id = E.MonitorId INNER JOIN Monitors as M on M.Id = E.MonitorId
"; ";