Home >Backend Development >PHP Tutorial >Wordpress中,PHP调用和Mysq调用l哪个更快些

Wordpress中,PHP调用和Mysq调用l哪个更快些

WBOY
WBOYOriginal
2016-06-23 13:32:59833browse

Wordpress
想根据分类ID来调用相应的图片
PHP的话,想写成case判断语句来调用
或者写入mysql数值,然后写个语句调用
大约有500+个分类
请问哪个快一些,谢谢


回复讨论(解决方案)

可维护性自然是 MySQL 占优
查询速度取决于你的文件组织

如果你写 500 个 case,那么你就该下课了

只写入mysql数值,那取出来不是一样要判断吗?

当然是mysql调用好。

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