Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
它假设是一个画廊,显示来自两个连接表的图像。不知何故,两个重复的图像而不是一个不断弹出。只有当我加入表格时才会发生这种情况。有没有办法使用 javascript 或一些 php 代码来防止这种情况发生。我在做错事。
将您的查询更改为此。
$sql = " SELECT images.id, header.username, images.message, images.name FROM images INNER JOIN header ON images.message=header.file group by images.id; ";
GROUP BY