contents 모듈 에러

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'eond.documents.regdate' which is not in SELECT list; this is incompatible with DISTINCT

modules/contents/contents.model.php:530라인


문제 원인

content.model.php 파일의 getDocumentList 함수에서는 $select 배열에 아무것도 추가되지 않았습니다. 따라서 SELECT 문에 추가된 열이 없습니다. $select 배열에 열을 추가하려면 다음과 같이 코드를 수정할 수 있습니다:

$select[] = 'documents.regdate';

이렇게 하면 documents.regdate 열이 SELECT 문에 포함됩니다. 예를 들어, documents.regdate를 추가하려면 다음과 같이 수정할 수 있습니다:


정리

콘텐츠모듈을처음 실행하면 위와 같은 오류 발생함.

$select에 아무것도 추가하지 않아서 발생함.