Home >Backend Development >PHP Tutorial >在写php语句中sql的写法有些混

在写php语句中sql的写法有些混

WBOY
WBOYOriginal
2016-06-13 12:19:50839browse

在写php语句中sql的写法有点混
即where和having是否可以通用
------解决思路----------------------
where 是删选数据表的条件
having 是删选结果集的条件

经 where 删选后,结果集就可能会很小
having 只是再做一次筛选以挑出所需数据

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