model层

public function selectone($ag_id=''){

        return $this->findBySql("SELECT * FROM agency where ag_id=$ag_id")->asArray()->one();
    }

 

controller层

$ag_id = $_GET['ag_id'];
        $data = $model -> selectone($ag_id);

 

view层

 

./index.php?r=about/agency&ag_id=<?php echo $value['ag_id'] ?>

posted on 2016-04-15 14:23  XXXX_易夫人  阅读(1073)  评论(0编辑  收藏  举报