Home > Backend Development > PHP Tutorial > mysql输出不全

mysql输出不全

WBOY
Release: 2016-06-23 13:38:55
Original
1016 people have browsed it

下图是我要做的大致效果,显示每年的活动:


自己写的代码:


代码显示效果:


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


回复讨论(解决方案)

两个查询的变量$row重复,前面的被覆盖了。

你内外循环的查询结果都存放在 $result 变量中,难道不产生冲突吗?

变量被覆盖啦

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template