title: Yii How to display the rendered query before it's executed
body: <p>In Yii How to display the rendered query before it's executed.</p>
  
  <pre><code>$sql="SELECT * from users WHERE user_id = :user_id";
      $command=Yii::app()-&gt;db-&gt;createCommand($sql);
      // replace the placeholder ":user_id" with the actual username value
      $command-&gt;bindParam(":user_id",$user_id,PDO::PARAM_INT);
      echo "&lt;br/&gt;".$command-&gt;getText();
  </code></pre>
  
  <p>I would like to print query included with bind param
  e.g user_id = 1 then</p>
  
  <pre><code>SELECT * from users WHERE user_id = 1
  </code></pre>