title: how to write sub query child query with multiple row parent query single row return
body: <p>The following query produces some errors:</p>
  
  <pre><code>$sub = '( SELECT mulitple.* FROM timezoneabbreviation AS mulitple
        WHERE single.gmtoffset = mulitple.gmtoffset) AS sametimezone';
  $query = "SELECT $sub,single.* FROM timezoneabbreviation AS single 
           WHERE full_name='".$full_name."' ";
  return $this-&gt;db-&gt;query($query)-&gt;row(); 
  </code></pre>
  
  <p>I want to write a query with a subquery in the same table with where condition main query produces single row but sub query produces multiple rows.</p>