the problem is I don’t know how to write a query that does what I want. I hope you can help. I have a table like this:
path (VARCHAR) | info (VARCHAR) | method (SET)
------------------------------------------------------------
/ | something | GET
/cp/product/% | something else | GET,PUT
/cp/product/edit/% | yap yap | DELETE,POST
What I want is a query which would show all methods available for the path, e.g. if I were to run something like this:
SELECT distinct_values_in_set(`method`) FROM `table` WHERE '/cp/product/edit/1337' LIKE `vpath`;
I’d expect a result set similar to
distinct_values_in_set(`method`)
--------------------------------
DELETE,GET,POST,PUT
1 Answer