title: cakephp find arrays
body: <p>Hi all I keep getting a Unknown column 'Array' in 'where clause' with <code>$receiverName</code>, when I debug <code>$receiver</code> I get this ouput</p>
  
  <pre><code>array(
      (int) 0 =&gt; array(
          'Invoice' =&gt; array(
              'receiver_id' =&gt; '3',
              'id' =&gt; '1'
          ),
          'FieldsInvoice' =&gt; array(
              (int) 0 =&gt; array(
                  'id' =&gt; '1',
                  'field_id' =&gt; '9',
                  'invoice_id' =&gt; '1',
                  'entered_value' =&gt; '1000.00'
              )
          )
      ),
      (int) 1 =&gt; array(
          'Invoice' =&gt; array(
              'receiver_id' =&gt; '4',
              'id' =&gt; '2'
          ),
          'FieldsInvoice' =&gt; array(
              (int) 0 =&gt; array(
                  'id' =&gt; '2',
                  'field_id' =&gt; '9',
                  'invoice_id' =&gt; '2',
                  'entered_value' =&gt; '2000.00'
              )
          )
      ),
      (int) 2 =&gt; array(
          'Invoice' =&gt; array(
              'receiver_id' =&gt; '7',
              'id' =&gt; '3'
          ),
          'FieldsInvoice' =&gt; array()
      ),
      (int) 3 =&gt; array(
          'Invoice' =&gt; array(
              'receiver_id' =&gt; '8',
              'id' =&gt; '4'
          ),
          'FieldsInvoice' =&gt; array()
      ),
  
      //returns receiver_id from the invoices table where sender_id=current user account
  
  $receiver=$this-&gt;Invoice-&gt;find('all',array(
          'fields'=&gt;('receiver_id'),'conditions'=&gt;array(
          'sender_id'=&gt;$accounts2)));
  
      //returns company_name from the accounts tables where receiver_id=account.id
  </code></pre>
  
  <p>what I'm trying to do is grab <code>receiver_id</code> from the array, then compare that with <code>account.id</code> then print <code>company_name</code> but its throwing an issue with the where statement in my <code>$receiverName</code> find</p>
  
  <pre><code>$receiverName=$this-&gt;Account-&gt;find('all',array(
          'fields'=&gt;('company_name'),'conditions'=&gt;array(
          'id'=&gt;$receiver)));
  </code></pre>