分类ID和商品名称在两个表里,我如何能按分类取出商品并且按str排序 数据表A里
id goods_id 商品ID category_id 商品分类ID
数据表B里
id name 商品名称 str排序
我如何能按分类取出商品并且按str排序
分享到:更多 ------解决方案--------------------
select B.id,B.name from A LEFT JOIN B ON A.goods_id=B.id order by B.str desc;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn