2009-07-23から1日間の記事一覧

find条件とか、unbindModelのメモ

自分用メモ findの条件でcurrent_date使う場合。配列のキーを指定せずに、値に全部入れる <php $field = array( 'id' ); $cond = array( 'activeid' => $id, 'status' => 1, 'activeid_expire >= current_date' ); $result = $this->find( 'first', array( 'conditions' => $cond, 'fields' => $field ) ); Findの条件</php>…