Hello, I, just started to use yii, I’m just a curious not a developer, and still a learning…
So please bare with me, as I looked around for some time now and can’t find a answer that fits into my issue.
so here it goes:
How can I pivot this table (see sample file) to show in Cgridview?
id_assistente(INT)|id_data(date)|id_horario(INT)|
|1 |2017-01-01 |1 |
|1 |2017-01-02 |2 |
|1 |2017-01-03 |3 |
|1 |2017-01-04 |3 |
|... |... |... |
|2 |2017-01-01 |1 |
|2 |2017-01-02 |2 |
|2 |2017-01-03 |3 |
|2 |2017-01-04 |3 |
|... |... |... |
I need it do display as:
id_assistente(INT)|2017-01-01|2017-01-02|2017-01-03|2017-01-04|...
1 |1 |2 |3 |3 |...
2 |1 |2 |3 |3 |...
Thanks in advance for any help provided.
Regards, Rui