php mysql dao基本操作,增删改查。以封装成class $my = new MysqlDao(); echo $my->pdo_delete(MODULE.'_network_list', array('id' => 17, 'uniacid' => 6)); $sql = 'select * from '.tablename(MODULE.'_network_list').' where uniacid=? and end_timequery($sql, arra
本文实例讲述了PHP模型Model类封装数据库操作。分享给大家供大家参考,具体如下:
<?php
//引入配置文件
include ./config.php;
class Model
{
public $link;//存储连接对象
public $tableName = ;//存储表名
public $field = *;//存储字段
public $allFields = [];//存储当前表所有字段
public $where