<div dir="ltr">I have the following code:<div><br></div><div><div>$query = db_query(&#39;SELECT * FROM table1 t1 LEFT JOIN table2 t2 ON <a href="http://t1.id">t1.id</a> = <a href="http://t2.id">t2.id</a>&#39;);</div><div>    $msg = $query-&gt;fetchAllAssoc(&#39;id&#39;);</div>
<div><br></div><div>Since it is 1:many data, I would expect </div><div><br></div><div>id 1</div><div>  another t1 field</div><div>  another t1 field</div><div>  t2 value 1</div><div>      more t2 from that row</div><div>  t2 value 2</div>
<div>      more t2 from that row</div><div>id 2</div><div><br></div><div>But I only get 1 t2 row for each t1. If I do the same query (without the fetchAllAssoc) in mysql I get the expected results.</div>-- <br>---<div><a href="http://drupal.org/user/367108" target="_blank">drupal.org/user/367108</a></div>
<div><a href="http://linkedin.com/in/jeffrgreenberg" target="_blank">linkedin.com/in/jeffrgreenberg</a></div><div><a href="http://accidentalcoder.com" target="_blank">accidentalcoder.com</a> / <a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a></div>
<div>@accidentalcoder</div>
</div></div>