Answer the question
In order to leave comments, you need to log in
How to select unique values from database in yii2?
It is necessary to select values for 2 fields (For example, code and name), lines where the "code" field is repeated, although the "name" field is different, should not be selected.
The result should look something like this:
Array [
[code => 1, name => a],
[code => 2, name => a],
[code => 3, name => b],
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question