这是我的代码
@$sql="select * from mp_images where id='5' and status='0'";
@$query=mysql_query($sql);
while(@$row=mysql_fetch_array($query))
{
@$image=$row ['photo'];
?>
<img src="image/<?php echo $image; ?>" width="360" height="150">
<?php
}
?>
将其添加到数据库后,我想显示当前的最新图像
最佳答案
只需按ID订购
@$sql="select * from mp_images where status='0' order by id desc limit 1";
关于php - sql选择当前图像代码,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17649448/