gpt4 book ai didi

php - sql选择当前图像代码

转载 作者:行者123 更新时间:2023-11-29 13:44:14 25 4
gpt4 key购买 nike

这是我的代码

@$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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com