title: A working query returning null when run through laravel
body: <p>I am trying to use a simple query with laravel but its not returning any data. but when I run same query in phpmyadmin it returns 3 rows.</p>
  
  <p>This is code in laravel.</p>
  
  <pre><code> $pages = DB::table('static_pages')
       -&gt;where('slug','=','(select slug from static_pages where id='.$id.')')
           -&gt;get();
  </code></pre>
  
  <p>this is the query it makes.</p>
  
  
  
  <pre><code>  select * from `static_pages` where `slug` = (select slug from static_pages where id=2)
  </code></pre>
  
  <p>Can you tell me what could be the reason?</p>