title: Convert SQL query to Doctrine code
body: <p>How can I write this SQL query to Doctrine 1.2 query?</p>
  
  <pre><code>SELECT * FROM homes 
      WHERE published = 1 
      AND
      (
       LOWER(country) LIKE '$search%' 
       OR 
       LOWER(city) LIKE '$search%'
       OR
       LOWER(area) LIKE '$search%'
      )
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>This is my actuall query. The example above was an simplified version. I just want to now how can I combine multiple WHERE together</p>
  
  <pre><code>Doctrine_Query::create()
                          -&gt;select('h.*,c.*')
                          -&gt;from('Homes h')
                          -&gt;where('h.published = ?',1)
                          -&gt;addWhere('LOWER(c.printable_name) LIKE ?', $search . "%")
                          -&gt;orWhere('LOWER(h.city) LIKE ?', $search . "%")
                          -&gt;orWhere('LOWER(h.area) LIKE ?', $search. "%")
                          -&gt;orWhere('LOWER(h.name) LIKE ?', $search. "%")
  
                          -&gt;leftJoin('h.Countries c');
  </code></pre>