All, I need to get a table value based on the primary key from it table then I used that on the other table. I can ilustrate my question like this:
table a
- id_a
- att_a1
- att_a2
- att_a3
- att_a4
- att_a5
table b (dummy table)
- id_a
- id_c
- percentage_a1
- percentage_a2
table c (here i need to calculate my result)
- id_c
- att_c1
= att_a1*percentage_a1
- att_c2
= att_a2*percentage_a2
- att_c3
= att_c2+att_a4
How could I do that in Yii?
Any response pls Thx, my regards