Error in SQL for processing filter

Support and queries relating to all previous versions of ZoneMinder
Locked
rchurch
Posts: 31
Joined: Thu Feb 16, 2006 3:55 pm

Error in SQL for processing filter

Post by rchurch »

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']
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for spotting this, basic quoting error! Found and fixed :D
Phil
rchurch
Posts: 31
Joined: Thu Feb 16, 2006 3:55 pm

Post by rchurch »

Where can the latest fixes be found?

Does ZoneMinder have its CVS or SVN repository?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

No there isnt a CVS. Phil has an extremly fast update cycle and for the more serious issues there are patches released but i think that 1.22.2 is imminent from what i gather
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

All packaged up now and should be out later today or tomorrow!
Phil
Locked