Selecting columns from two tables Yii2
<p>I have a join query between tables(t1,t2) that needs to select some columns from BOTH tables .</p>

<p>Doing something like :</p>

<pre><code>t1::find()-&gt;select("t1.id , t2.id")-&gt;innerJoin('t2 ...)
</code></pre>

<p>but, it doesn't retrieve t2.id .</p>

<p>How to do it in Yii ?</p>

<p>The corresponding MySql query :</p>

<pre><code>select t1.id , t2.id from t1 inner join t2 on t1.id = t2.id;
</code></pre>