Using a foundset in find mode I can search for records which have a field with values that are in an array by using:
- Code: Select all
foundset.find();
foundset.myField = ['value1', 'value2', 'value3', ...];
foundset.search();
What is the equivalent code for finding records whose value is NOT IN the array i.e. WHERE myTable.myField NOT IN ('value1', 'value2', 'value3', ...)?
I would normally do this sort of thing using Query Builder as it has much more control over finding records, but in this particular scenario one of the criteria that I am using in the search (not the array based one) is a calculation and I can't find a way to include calculations in a Query Builder select statement.
A solution to either scenario (find mode NOT IN or Query Builder using calculations) would be most appreciated.
Thanks
Steve