Error in SQL for processing filter
Posted: Wed May 24, 2006 2:20 pm
I checked the query below and I have noticed that the Events database does not have a column MonitorName. I suspect that part should be M.Name. I don't think MySQL accepts aliases in the where clause.
I will change the filter to use MonitorId for the time being to see if it will work.
/tmp/zmfilter.log:05/24/2006 14:05:20.653328 zmfilter[9337].ERR [Can't execute filter 'select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( E.MonitorName = Camera_1 and E.Length <= 599.97 and E.Length >= 599 and E.Length >= 599 ) and ( E.Archived = 0 or E.Videoed = 0 ) order by E.StartTime asc', ignoring: Unknown column 'E.MonitorName' in 'where clause']
I will change the filter to use MonitorId for the time being to see if it will work.
/tmp/zmfilter.log:05/24/2006 14:05:20.653328 zmfilter[9337].ERR [Can't execute filter 'select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( E.MonitorName = Camera_1 and E.Length <= 599.97 and E.Length >= 599 and E.Length >= 599 ) and ( E.Archived = 0 or E.Videoed = 0 ) order by E.StartTime asc', ignoring: Unknown column 'E.MonitorName' in 'where clause']