title: Yii CDBCommand getText to show all variables in the SQL
body: <p>I am using Yii's Yii::app()->db->createCommand() to build an SQL query.  In order to view the SQL code that Yii generates, I am using the getText() method of CDBCommand.  Problem is, when I use the getText() method on SQL code that contain parameters, for example:</p>
  
  <pre><code>Yii::app()-&gt;db-&gt;createCommand()
             -&gt;select("name")
             -&gt;from('package')
             -&gt;where('id=:id', array(':id'=&gt;5))
             -&gt;queryRow();
  </code></pre>
  
  <p>the getText() method returns the following SQL:</p>
  
  <pre><code>select name from package where id=:id
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>select name from package where id=5
  </code></pre>
  
  <p>This is fine for simple queries, but for more complex queries with lots of parameters, it is quite a pain to copy/paste each parameter into the SQL code to test it.  </p>
  
  <p>Is there any way to display the parameters directly inside the SQL using getText() or some other method in Yii?</p>
  
  <p>Cheers!</p>