returning all records with the same ID but different values
I've been trying this query
Model::find()
->innerJoin('TranslationTable', 'TranslationTable.model_id = Model.id')
->where(['IN', 'translation_code', $arrayOfTranslationCodes])
->asArray()
->all();
The translation table contains multiple rows with the same ID but with different translation codes.
This query only returns the first matching locale for a given ID. How would I retrieve the other translation codes for a given ID?
from Recent Questions - Stack Overflow https://ift.tt/2RMJWXm
https://ift.tt/eA8V8J
Comments
Post a Comment