title: Correct use of Where in Query in YII2
body: <p>I try to limit search result in Yii2 using Query class and where condition</p>
  
  <pre><code>$command=(new Query())          
           -&gt;select('*')
           -&gt;from('ct_ostatniNaklady')
           -&gt;where('pid=:pid',[':pid' =&gt; 1])
           -&gt;createCommand()-&gt;sql;
  
          var_dump($command);die;
  </code></pre>
  
  <p>However where command is not working properly. I get this result when I dump $command:</p>
  
  <pre><code> string(48) "SELECT * FROM `ct_ostatniNaklady` WHERE pid=:pid" 
  </code></pre>
  
  <p>I don`t know why is :pid string not replacing by 1.</p>
  
  <p>Using diffent syntax has no effect</p>
  
  <pre><code> -&gt;where(['pid'=&gt;'1'])
  </code></pre>
  
  <p>result is quite common:</p>
  
  <pre><code>  string(50) "SELECT * FROM `ct_ostatniNaklady` WHERE `pid`=:qp0" 
  </code></pre>
  
  <p>What is correct way how to use where condition?</p>