get empty instead of repeated value in query
0
I have a table like this |num|id|name|prj| | 1 | 1|abc | 1 | | 2 | 1|efg | 1 | | 3 | 1|cde | 1 | | 4 | 2|zzz | 1 | I want to run a query like this: SELECT * FROM table WHERE prj=1 ORDER BY name but printing out repeated values only once. I want to keep all the rows and I would like to do this at database level and not on the presentation layer (I know how to do it in php). Desired result is |num|id|name|prj| | 1 | 1|abc | 1 | | 3 | |cde | 1 | | 2 | |efg | 1 | | 4 | 2|zzz | 1 | any hint on where to start from to build that query?
mysql
share | improve this question
edited Nov 15 '18 at 18:06
...