Home  >  Article  >  Backend Development  >  php用一个函数获取要查询的条件

php用一个函数获取要查询的条件

WBOY
WBOYOriginal
2016-06-06 20:14:09962browse

比如我要根据条件获取数据表。我想用一个函数来获取条件,请问要怎样的思想,最好详细点

回复内容:

比如我要根据条件获取数据表。我想用一个函数来获取条件,请问要怎样的思想,最好详细点

if判断,switch判断,喜欢的话可以用上工厂模式

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