我並沒有花太多時間在MySQL中,但我被要求查看我的教會網站的問題。它已經停機了很長一段時間,我正試圖恢復正常運行。原址是在Mambo 4.5.3中完成的,這是一箇舊版本。我會在某個時候升級它,但我只想暫時讓它運行。MySQl查詢問題
我目前在下面的查詢中建立了Mambo的問題。無論網站管理員何時嘗試訪問網頁,我都會收到錯誤消息:
'on子句'中的未知列'c.access'。
我已驗證列確實存在於指定的表中。現在我很難過。我打開了MySQL查詢分析器並粘貼了查詢,並得到了與代碼1054相同的錯誤消息。有沒有人有任何想法?
SELECT
c.*,
g.name AS groupname,
cc.name,
u.name AS editor,
f.content_id AS frontpage,
s.title AS section_name,
v.name AS author
FROM
mos_content AS c,
mos_categories AS cc,
mos_sections AS s
LEFT JOIN mos_groups AS g ON g.id = c.access
LEFT JOIN mos_users AS u ON u.id = c.checked_out
LEFT JOIN mos_users AS v ON v.id = c.created_by
LEFT JOIN mos_content_frontpage AS f ON f.content_id = c.id
WHERE
c.state >= 0
AND c.catid=cc.id
AND cc.section=s.id
AND s.scope='content'
ORDER BY
s.title,
c.catid,
cc.ordering,
cc.title,
c.ordering
LIMIT
0,10
所以你確定在MOS_CONTENT表中名爲'access'的列? – Fosco 2010-08-03 18:13:43
該表mos_content應該有訪問列,我認爲沒有其他原因得到該錯誤 – cesarnicola 2010-08-03 18:14:16