Home > php教程 > PHP开发 > body text

phpcms v9二次开发之数据模型类

WBOY
Release: 2016-06-07 17:24:06
Original
1492 people have browsed it

系统模型类:model.class.php


数据模型类的位置:/phpcms/libs/classes

  phpcms v9二次开发中,我们要经常需要对模块的数据表进行查询、添加、修改和删除数据等操作,所有这些操作都离不开数据模型类model.class.php,它起到开发者与数据表的交互作用。model.class.php里面封装了许多数据表操作的方法,基本上常用的mysql操作语句都能从中找到,但是它又和原生态的mysql语句有所不同,和其它PHP内容管理系统一样,PHPCMS也对原生态的mysql语句进行封装简化,以使它操作起更加方便,为开发者省去了不少麻烦。具体我们来看一下model.class.php代码片断:

Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template