The problem is: when I click from navigation bar letter number = 1, it will display all images associated with letter number 1. All in one click but I want to show images one by one with next and previous hyperlink.推荐答案您仅使用1个过滤字段,需要同时使用(letteNo和imageNo)You are only using 1 filtering field you need to use both (letteNo and imageNo)$query="SELECT letterNo, width, height, path from annimages where letterNo=".$letterNumber." AND imageNo=".$imageNo." LIMIT 1";$rs=mysql_query($query,$connection);$row=mysql_fetch_array($rs)echo '<br/>';echo '<img src="'.$row['path'].'.jpg"'.'width="'.$row['width'].'"height="'.$row['height'].'" alt=Letter "'.$letterNumber.'" />'.'<br/>'; mysql LIMIT关键字限制返回多少行,但是,如果letterNo和imageNo的每个组合都与单个行相关,则不需要此行.虽然最好有一个限制,以防您没有捕获到所有的mysql注入攻击.mysql LIMIT keyword limits how many rows are returned, though you dont need it if each combination of letterNo and imageNo relate to a single row. Though it is good to have a limit incase you dont catch all mysql injection attacks.,每个上一个下一个链接都需要传递下一个letterNo和imageNoand each previous next link will need to pass the next letterNo and imageNo当然可以按照Madara Uchiha在其评论中建议的方式进行操作,并使用mysqli api,因为mysql api已贬值And of course do as Madara Uchiha suggests in his comment and use mysqli api as the mysql api is depreciated 这篇关于带有上一个和下一个功能的一张一张显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 13:49