HEX
Server: Apache/2.4.6 (CentOS) PHP/5.6.39
System: Linux izj6c6ukj0hyugxsgmuxz3z 3.10.0-514.6.2.el7.x86_64 #1 SMP Thu Feb 23 03:04:39 UTC 2017 x86_64
User: root (0)
PHP: 5.6.39
Disabled: NONE
Upload Files
File: /web/data/weixin.tbbbearing.com/App/Manage/Model/ThirdCodeModel.class.php
<?php
/**
 * Created by PhpStorm.
 * User: 18613127572
 * Date: 2018/1/30
 * Time: 13:33
 */

namespace Manage\Model;


use Think\Model;

class ThirdCodeModel extends Model{
    public function get_all($where='1'){
        return $this->where($where)->order('add_time asc')->select();
    }

    public function get_one($where){
        return $this->where($where)->find();
    }

    public function add_one($data=array()){
        if(!$data)
            return false;
        $this->add($data);
        return true;
    }

    public function update_one($where='',$data=''){
        $this->where($where)->save($data);
    }

    public function remove_one($where=''){
        $row = $this->get_one($where);
        $this->where($where)->delete();
        return $row;
    }
}