I have a set of data like this in a databoject called MyFruit
I want to be able to query the dataobject and get a list of fruit from it. The kind of thing you would do with a SQL query using the groupby function. I know how to do it using the 'new SQLSelect' method, but i want to know how to use it with the easier syntax that we use in silverstripe....something like
The column() method returns a simple array containing values from only the specified column, but I don't know whether the preceding distinct() method call will affect it or not. If it works, you should be able to avoid duplicate results, but I can't guarantee as I haven't tested the code.