【发布时间】:2018-08-09 17:53:01
【问题描述】:
我想在 php 页面的查询中使用内连接和排序。
我的查询:
select
*
from
table1
inner join
table1category
on table1.table1category_id = table1category.id
order by updateDate desc;
'updateDate' 用于 table1 => 错误:订单子句中的列 'updateDate' 不明确
【问题讨论】:
-
错误信息说明了一切。您需要指定要订购的更新日期。例如。试试
order by table1.updateDate desc。 -
需要添加table_name,如
order by table1.updateDate