复制代码 代码如下: SELECT c.id, c.order_id, c.title, c.content, c.create_time, o.last_pic FROM `orders` o , `case` c WHERE c.order_id = o.order_id ORDER BY c.id DESC LIMIT 15; 关于跨表提取字段的方法! 利用order_id相同字
SELECT c.id, c.order_id, c.title, c.content, c.create_time, o.last_pic FROM `orders` o , `case` c WHERE c.order_id = o.order_id ORDER BY c.id DESC LIMIT 15;
关于跨表提取字段的方法!
利用order_id相同字段,提取case中的id,order_id,title,content,create_time;orders表中的last_pic字段