DB function failed with error number 1054
ระหว่างการย้ายข้อมูลข้ามเซิร์ฟเวอร์ ได้ทำการติดตั้ง mambo ลงไปด้วย แต่ระหว่างการใช้งาน กลับพบข้อความแสดงข้อผิดพลาดดังนี้
DB function failed with error number 1054
Unknown column ‘c.access’ in ‘on clause’ SQL=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
ได้ทำการหาข้อมูลจากอินเตอร์เน็ต และพบว่า สาเหตุเกิดจาก ข้อมูลเดิมทำงานอยู่บน MySQL เวอร์ชั่น 4.1 แต่พอย้ายมาเป็นเวอร์ชั่น MySQL 5.0 ก็เลยพบข้อความดังกล่าวครับ
วิธีการแก้ไข สามารถทำได้โดย แก้ไขที่ไฟล์ administrator/components/com_content/admin.content.php บรรทัดที่ 201 โดยมีการเปลี่ยนแปลงดังนี้
จาก
. “\n FROM , #__content AS c, #__categories AS cc, #__sections AS s”
เป็น
. “\n FROM #__categories AS cc, #__sections AS s, #__content AS c ”
ทำการบันทึกไฟล์ แล้วลองล็อกอินเข้าสู่ระบบ ก็จะสามารถใช้งานได้ปกติ
Comments
One Response to “DB function failed with error number 1054”
Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!

ทดสอบระบบ