2009-07-12 2009-01-11 Staff アプリケーション (1) ================================================================================ クエリーは、ID の一致による。 list から、そのまま show アクションを使う。 ■アクション毎のテンプレート □ templates/listSuccess.php のクエリー部分 --- : "post")) ?> : --- ★別解★ クエリーは、名前による一致。 BBS アプリケーションとの違いとして、今度は、別のアクション・メソッドを使っている。 ■ actions/actions.class.php 新規追加メソッド --- public function executeQuery() { $c = new Criteria; $c->add(StaffPeer::NAME, $this->getRequestParameter('name')); $this->staff = StaffPeer::doSelectOne($c); $this->forward404Unless($this->staff); } --- ■アクション毎のテンプレート □ templates/listSuccess.php のクエリー部分 --- : 漢字の名前を入力してください。 "post")); ?> : --- □ templates/querySuccess.php --- --- 以上