ON子句中的另一个未知的列名错误 [英] Another unknown column name error in ON clause
本文介绍了ON子句中的另一个未知的列名错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
查询:
SELECT c.title AS title
, c.introtext AS body
, c.state AS state
, c.created AS created
, c.created_by AS uid
, c.modified AS modified
, c.modified_by AS modified_uid
, c.published AS published
, c.published_by AS published_uid
, jos_categories.title AS category
FROM
jos_content AS c, jos_categories
INNER JOIN jos_categories AS jc
ON c.sectionid = jc.section
WHERE c.sectionid = 7
我确定sectionid列存在,但出现错误:
I am sure that sectionid column exists, but I am getting error:
错误代码:1054.打开"中的未知列"c.sectionid" 条款0.000秒
Error Code: 1054. Unknown column 'c.sectionid' in 'on clause' 0.000 sec
我看到了以下主题: ON子句中的MySQL未知列,但我也无法解决.
I saw this topic: MySQL unknown column in ON clause but I can't solve it too.
推荐答案
将FROM子句更改为:
change your FROM clause to:
FROM jos_content AS c
INNER JOIN jos_categories AS jc
ON c.sectionid = jc.section
WHERE c.sectionid = 7
这篇关于ON子句中的另一个未知的列名错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文