title: Print Sql query in Symfony
body: <p>I need to findout the normal sql query for the below. Can you guys please suggest me how can i achieve in Symfony. </p>
  
  <p>Example: </p>
  
  <pre><code> $r = Doctrine_Query::create()
      -&gt;select('u.worked_hours')
       -&gt;from('tasksComments u')
       -&gt;where('u.tasks_id = ?', $arr_values['tasks_id'])
       -&gt;andwhere('u.id != ?', $arr_values['id'])
       -&gt;andwhere('u.created_at LIKE ?', $date."%");
  $results1 = $r-&gt;execute();
  </code></pre>