group by和where的用法select * from peizhi where tag=$row[tag] group by brand这样写是错的。实现的是把以tag为条件把相同里面brand信息给取出来,并且是通过group by的方式取出来brand------解决方案-------------------- select * from peizhi where tag=$row['tag'] group by brand