Yii Form And Multiple Tables: How Can I Get Data From Multiple Table By An Attribute And Place Into A From

I have 3 table. in 3 table there have common column is "name". Now I am using a form (typing name in name filed) and want to get data from others table by my current name filed. I think I need to do something from controller. But I need to know how can I do that. Could you please help me with some <examples> OR <idea> … please

You can use activerecord and u can access any table data in any form …

  1. FindAll()

  2. FindAllBy Attributes()

3.findByPk()