There was indeed a typo in my code above (now fixed) - sorry about that.
The only problems with your presented solution are that you are using the smartmatch operator which is deprecated and also it's unlikely to be as fast. If you can't change the DB query to use DISTINCT as others have suggested, I'd still recommend the hash approach.
In reply to Re^3: Printing Categories from SQL search
by hippo
in thread Printing Categories from SQL search
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |