Home  >  Article  >  Backend Development  >  mysql输出不全,该怎么处理

mysql输出不全,该怎么处理

WBOY
WBOYOriginal
2016-06-13 12:15:511101browse

mysql输出不全
下图是我要做的大致效果,显示每年的活动:


自己写的代码:


代码显示效果:


数据库中还有14和13年的数据,但是不显示为什么,去掉红色框可以显示年份:

------解决思路----------------------
两个查询的变量$row重复,前面的被覆盖了。


------解决思路----------------------
你内外循环的查询结果都存放在 $result 变量中,难道不产生冲突吗?
------解决思路----------------------
变量被覆盖啦

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