** A search doesnt work because it will see 1 and 11 and list them. **
That is probably because of the way Perl's string comparison operator (eq) works. If I remember correctly, it only compares the 2 values up until the end of the first search term. So if one is shorter than the other, it only looks to see if the longer one starts with the shorter one.
The matching routine is contained in the sub DBMatch in the DBFile.pm file located in the calendarscript/lib directory.
You could try changing the order of the parameters in the string comparison routine to see if that helps. The following line:
if ($a eq $b) { return 1; }
would need to be changes to something like
if ($b eq $a) { return 1; }
or maybe even
if ($a eq $b && length($a) == length($b) ) { return 1; }
To compare the lengths of each as well.
Or you could try totally changing the string comparison operation to something like:
if ($a ~= /^$b$/) { return 1; }
Which should hopefully look for exact matches only.
All of these are untested and I have no idea what effects such a change may have on other parts of CalendarScript so use at your own risk and don't forget to make a back up of the original files just in case!
Dan O.
------------------