2013-05-13から1日間の記事一覧

hasManyで日付指定

hasManyで日付条件を指定する時のメモ。 hasManyで日付指定 $today = date('Y-m-d'); $nextWeek = date('Y-m-d', strtotime($today.'1 week')); $options = array( 'Recipe.date >=' => $today, 'Recipe.date <' => $nextWeek, ); $this->User->hasMany['Rec…