zoukankan      html  css  js  c++  java
  • 后盾网-CI框架实例教程-马振宇

    第七节视频:

        CI框架学习-实例操作利用AR类对栏目进行查、删、改动作

      

      取cid的方法:

        $cid = $this->uri->segment(4);//取第4个片段;

        

      /*查询对应栏目*/

        public function check_cate($cid){

          $data = $this -> db ->where(array('cid' => $cid)) ->get('category') ->result_array();

          return $data;

        }

      /*修改栏目*/

        public function update_cate($cid,$data){

          $this -> db ->update('category',$data,array('cid'=>$cid));

        }

      

      /*删除栏目*/

      public function del(){

        $cid = $this -> uri ->segment(4);

        $this ->load ->model('category_model','cate');

        $this ->cate ->del($cid);

      }

      /*构造函数*/

      /*自动载入*/

      public function _construct(){

        parent::_construct();

        $this ->load ->model('category_model','cate');

      }

      

  • 相关阅读:
    测试中发现哪些bug
    兼容性测试
    接口测试基础
    Java基础概念
    Linux基础命令
    Selenium笔记
    常见软件测试类型分类
    性能测试类型
    网络基础题目
    常见测试方法
  • 原文地址:https://www.cnblogs.com/chengshun/p/7637091.html
Copyright © 2011-2022 走看看