扫码关注官方订阅号
用from的方法查找每个栏目下的最新商品,为什么查找出来的结果不正确
select goods_id,cat_id,goods_name from (select * from goods where 1 order by cat_id asc,goods_id desc)as tep group by cat_id;
分组-》排序-》取最新
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
分组-》排序-》取最新