2011-01-06 4 views
-1

최근에 두 번째로 똑같은 오류가 발생했습니다. 나는 그것이 더 이상 사용되지 않는 메소드를 사용하는 데 따르는 자습서와 관련이 있다고 생각합니다.CakePHP에서 SQL 에러 : 1064 받기

오늘 오류가 내 types_controller.php에서 온다, 라인 64 :

$types = $this->Type->findAll("status=1"); 

나에게 오류 제공합니다 : 나는 자습서 어제 다음 기억

Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'findAll' at line 1

어디에서 $ this-> 모델 같은 라인 -> 검색 (param)에서 오류가 발생했습니다.

SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'search' at line 1

여기에 문제가 있는지 확실치 않습니다.

답변

5

정확합니다. 해당 메서드는 사용되지 않습니다. 설명서를 참조하십시오

find('all', array('conditions'=>"status=1")) 

findAll("status=1") 

교체 : 난 항상 당신이 바로 설명서를 읽고 있다는 것을 확인하기 위해 추가 할 것 http://book.cakephp.org/view/1017/Retrieving-Your-Data

+0

을 (페이지 상단 참조). – kaklon