title: Cakephp How to query the paid amount?
body: <p>I dont know whats wrong but my code dont output the paid amount column</p>
  
  <pre><code>$payment_tbl = TableRegistry::get("MembershipPayment");
  $payments = $payment_tbl-&gt;find();
  $payments-&gt;select(['payment_total'=&gt; $payments-&gt;func()-&gt;sum('paid_amount')]);
  $this-&gt;set("payments",$payments);
  </code></pre>
  
  <p>and then echo this as echo <code>$payments-&gt;payment_total;</code></p>