place (id, title, state);
movie (id, title, state);
schedule (place_id, movie_id, time);
使用簡單警予型號:
place.relations:
'movies' => array(self::MANY_MANY, 'movie',
'schedule(place_id,movie_id)',
'condition' => 'time > now()'),
使用簡單警予控制器:
$tmp = new Place();
$res = $tmp->findAll();
var_dump($res[0]->movies);
警予返回的完整列表,與出狀態狀態:(
如何獲得電影的條件movie.state = 1?
我明白:)謝謝! – m15mike 2012-03-28 08:14:39