美文网首页
CI中的DB操作-----多表关联查询语法……

CI中的DB操作-----多表关联查询语法……

作者: wangjunmech | 来源:发表于2018-08-21 10:46 被阅读0次
    $cuslist1= $this->db->select(字段)->from(表名)->join(表名)->order_by(字段)->get()->result_array();
    $config['total_rows'] = $this->db->count_all_results();//计算记录总数
    public function edit($id){//修改编辑-----get_where()的用法第一个参数为表名,第二个参数为条件(字段名=>值)
        $this->db->select($this->id.','.$this->email.','.$this->des.','.$this->name.','.$this->site);
        $data = $this->db->get_where('client_list',array('id'=>$id))->result_array();
            return $data;
            }`
    

    相关文章

      网友评论

          本文标题:CI中的DB操作-----多表关联查询语法……

          本文链接:https://www.haomeiwen.com/subject/tcydiftx.html