问题描述
用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;
问题解答
回答1:分组-》排序-》取最新

问题描述
用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;
问题解答
回答1:分组-》排序-》取最新
相关文章:1. javascript - 关于input="file",重复选择同一文件时不触发change事件的问题2. javascript - var x = "[{’a’:’xx’},{’b’:’xxx’}]";如何在js中解析成json对象3. javascript - 在移动端input type="number" 键盘没法弹起4. javascript - type="date"的默认值能改变为当天日期吗5. mysql - sphinx查询 "中国" 时也能查询到 "中华人民共和国"6. javascript - body下多出了"1"==$0导致页面上多了17. html5 - 有可以一次性把所有 css外部样式转为html标签内style=" "的方法吗?8. mysql 使用 join 还是 "," 进行多表查询???9. javascript - (_a = [""], _a.raw = [""],....); js一个小括号的是什么意思?10. javascript - 一个字符串转换成数字,例子就是a="2,322.222",b=’1,211.21’,如何在angualr中执行相减
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主