ci codeigniter 查询 获取 一条数据 db select get row_array()

    function get_one($where = array(),$select='*'){
        $this->db->select($select);
        if($where){
            $this->db->where($where);
        }
        $this->db->limit(1);
        $query = $this->db->get('ych_sendreward');
        return $query->row_array();
    }

 

posted @ 2016-05-31 11:11  WilliamShaw  阅读(2073)  评论(0编辑  收藏  举报