1

Am trying to display only unique values from a matrix column

Is it possible with using the Query module?

1 Answer 1

2

Well, the query module gives you direct access to SQL querying your database tables, so this seem quite possible. It depends on the complexity: Are you looking to isolate rows based on a unique column? Isolate entirely unique rows? We'd need more details to help better.

But, without more info, a good start is learning about the DISTINCT clause available in MySQL queries: http://www.mysqltutorial.org/mysql-distinct.aspx

1
  • Thank you @jrothafer. I was trying to isolate rows based on a unique column value. Stash worked fine. Used stash:set_list and get_list to store values of matrix field in a list and applied the unique="yes" parameter to make it work. Tried the Query module as well and it too worked. However, will stick with stash as I am able to reuse the values from the list.
    – Gret Icyer
    Apr 5, 2016 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.