Page 1 of 1
How to specify a name filter?
Posted: Wed Mar 30, 2005 10:17 pm
by JasonH
I want to list all the events that I have renamed. I have tried:
Name does not match Event%
...and several combinations of asterisks and double / single quotes but I keep getting
Code: Select all
....window.focus(); You have an error in your SQL syntax near ')' at line 1
Any ideas greatly appreciated
Posted: Fri Apr 01, 2005 7:10 pm
by zoneminder
Interesting. I wonder if it is JavaScript barfing on the '%'. Have you tried escaping it, e.g. Event\%?
If that still fails I'll have a proper look and fix it.
Phil
Posted: Mon Apr 04, 2005 7:33 pm
by JasonH
Escaping it doesn't do anything but a different error appears if you don't include any wildcards. Trying "Name matches X"
Code: Select all
function newWindow(Url,Name,Width,Height) { var Name = window.open(Url,Name,"resizable,scrollbars,width="+Width+",height="+Height); } function eventWindow(Url,Name,Width,Height) { var Name = window.open(Url,Name,"resizable,width="+Width+",height="+Height ); } function filterWindow(Url,Name) { var Name = window.open(Url,Name,"resizable,scrollbars,width=560,height=250"); } function closeWindow() { window.close(); // This is a hack. The only way to close an existing window is to try and open it! var filterWindow = window.open( "/zm/index.php?view=none", 'zmFilter', 'width=1,height=1' ); filterWindow.close(); } window.focus(); Unknown column 'X' in 'where clause'
Note, the preamble was there before but I didn't include it as I thought I'd made a newbie error
However, it works with numbers! Trying "Name matches 1234" brings back all events with 1234 in their name. I wonder what's going on there
Posted: Mon Apr 04, 2005 9:26 pm
by zoneminder
I suspect it is a quoting issue. It is happy with 1234 as numbers don't need quoting. It's probably still a bug but you could try "Name matches 'X'" making sure you put double or single quotes around your string. ZM should probably do this automatically though.
Phil
Posted: Thu Apr 07, 2005 6:33 pm
by JasonH
Nope, tried all the quotes and even escaped quotes.
However, I'd put this on the bottom of the list though as it's easy to use mysql to query the Event table directly.
Thanks
Posted: Mon May 16, 2005 11:13 am
by zoneminder
I have been unable to reproduce this error. Can you confirm whether you are still getting it and if so perhaps I could suggest a couple of lines of diagnostics to try.
One thing I would mention is that the 'matches' and similar use full regular expressions and not the more limited sql version. So your filter could be 'matches ^Event' rather than Event%.
Phil