我正确的MySQL查询应该返回4个图像,只返回3

时间:2017-09-16 15:08:12

标签: php mysql

当我在phpMyAdmin SQL选项卡中查询它时,它正常工作。我想要完成的是显示用户上传的所有图像(目前是4个),但我只得到3个(丢失的一个总是第一个)。这是我的代码:

Name,Age,Place,Des,Name,Age,Place,Edu,Des,Remarks
aaa,40,xxx,Aug,aaa,50,zzz,eee,Sep,Matched
aaa,40,xxx,Aug,aaa,60,yyy,fff,Sep,Matched
aaa,20,yyy,Aug,aaa,50,zzz,eee,Sep,Matched
aaa,20,yyy,Aug,aaa,60,yyy,fff,Sep,Matched
ccc,35,xxx,Aug,NOT,NOT,NOT,NOT,NOT,Not in Sep.csv
NOT,NOT,NOT,NOT,bbb,30,xxx,yyy,Sep,Not in Aug.csv
NOT,NOT,NOT,NOT,bbb,50,yyy,fff,Sep,Not in Aug.csv

1 个答案:

答案 0 :(得分:2)

这一行,在循环消耗第一行之前。只需将其删除即可。

$getResult2 = mysqli_fetch_assoc($result2);