title: Magento issue with external mod "Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous"
body: <pre><code>$select-&gt;joinLeft(
         array('order_table' =&gt; $collection-&gt;getTable('sales/order')),
         'order_table.entity_id=main_table.entity_id',
         array('admin_user_id' =&gt; 'admin_user_id')
  );
  </code></pre>
  
  <p>in a custom magento module that is causing the error </p>
  
  <pre><code>Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous
  </code></pre>
  
  <p>commenting out this code allows magento to run correctly, the code is located in an observer</p>
  
  <pre><code>    public function salesOrderGridCollectionLoadBefore($observer)
      {
          $collection = $observer-&gt;getOrderGridCollection();
          $select = $collection-&gt;getSelect();
          $select-&gt;joinLeft(
             array('order_table' =&gt; $collection-&gt;getTable('sales/order')),
                 'order_table.entity_id=main_table.entity_id',
              array('admin_user_id' =&gt; 'admin_user_id')
          );
      }
  </code></pre>
  
  <p>Could anybody advise a fix, this is not my code or my module, and I don't fully understand everything it is doing.</p>
  
  <p>I am guessing it adds a field to a table and populates it then allows you to search using it using the order page.</p>
  
  <p>Thanks in advance.
  -T</p>