Home >Backend Development >PHP Tutorial >为啥所有框架都要把数据库操作封装成对象

为啥所有框架都要把数据库操作封装成对象

WBOY
WBOYOriginal
2016-06-13 12:05:011149browse

为什么所有框架都要把数据库操作封装成对象
特别讨厌写个SQL还要去适应不同框架的不同写法,封装成对象有什么好处吗,请高手解惑
------解决方案--------------------
因为方便自己调用啊。
适应不同的数据库。
------解决方案--------------------
扩展性强啊。

Statement:
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