title: mongodb php multiple collections
body: <p>A bit of weird issue - I am looking to enter data into two separate 
  collections (same db) and I am getting totally weird results.   I am 
  sure it is the way I am doing this but it is the results which have me 
  a bit baffled. </p>
  
  <p>Here is a snippet of what I am trying to accomplish: </p>
  
  <pre><code>    $mynewconnection = new Mongo();                                 // create new mongo connection 
      $collectionDB                  = $mynewconnection-&gt;Datadb;         // select db 
      $collectionA                 = $collectionDB-&gt;DataA;                // select collectionA 
      $collectionB                 = $collectionDB-&gt;DataB;                // select collectionB 
  
  
      /* Go off and chop up data and create CriteriaA/B */ 
  
       $insertA        = $collectionA-&gt;insert($criteriaA); 
       $insertB        = $collectionB-&gt;insert($criteriaB); 
  </code></pre>
  
  <p>So what I am trying accomplish is to enter part of the data set into 
  one collection and the other part of the dataset into another 
  collection.   What is happening is that sometimes the data will be 
  entered into Both collections (as desired) and other times data will 
  be entered into just collectionA and yet other times data will be 
  entered into just collectionB. </p>
  
  <p>Anyone have any ideas on what I am missing or what would be causing 
  this strange behavior?</p>