五指cms的数据库操作类之:删除数据

2016-12-22 21:04:54
1 首先加载对应的数据库类$db = load_class(& 39;db& 39;);2 调用delete方法$delete = $db->delete($table, $where = & 39;& 39;); $table 表名 $where删除数据的条件,必须非空
<code style="box-sizing: border-box; font-family: " yahei="" consolas="" hybrid",="" consolas,="" "meiryo="" ui",="" "malgun="" gothic",="" "segoe="" "trebuchet="" ms",="" helvetica,="" monospace,="" monospace;="" font-size:="" 14px;="" padding:="" 3px;="" color:="" rgb(199,="" 37,="" 78);="" background:="" rgb(246,="" 246,="" 246);="" border-radius:="" margin:="" 0px="" 4px="" 5px;="" border:="" 1px="" solid="" rgb(221,="" 221,="" 221);="" text-indent:="" 20px;"="">$delete = $db->delete($table, $where = ''); //$table 表名 $where删除数据的条件,必须非空



// +----------------------------------------------------------------------
defined('IN_WZ') or exit('No direct script access allowed');
load_class('admin');
class index extends WUZHI_admin {
    private $db;
    function __construct() {
        $this->db = load_class('db');
    }
    function delete() {
        $delete = $db->delete($table, $where = '');//删除之后返回是以boolean类型返回
    }
}

相关词搜索:五指 数据库

上一篇:五指cms的apache 设置禁止访问某些文件或目录
下一篇:最后一页