2012-02-21 3 views
0

내가 CakePHP는 1.3 플러그인을 만들려고하고 있어요,하지만 난 나를 실망 다음과 같은 오류 데 : 나는 여러 가지를 시도했지만 마련하지 않은CakePHP는 1.3 플러그인 : 데이터베이스 오류

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 'process' at line 1 

을 해결책; 나는이

class Visitor extends VisitorsAppModel { 
    var $name = 'Visitor'; 

    function process($url = null){ 
     $this->deleteInactive(); 
     if($this->_isBot() == FALSE){ 
      $this->_updateVisitor($url); 
     } 
    } 
} 

는 이상한 것은 내 플러그인 내 visitor.php 모델 파일에 다음 한

var $uses = array('Visitor.Visitors'); 

function beforeRender(){ 
    $this->Visitors->process($this->here); 
} 

그리고 :

는 기본적으로 나는 내 app_controller.php 파일에서 다음 호출 위의 함수를 주석 처리하더라도 여전히 동일한 MySQL 오류 1064가 발생합니다.

Help!

답변

0

$this->Visitors->process($this->here);에서 '방문자'를 '방문자'(단수)로 변경해보세요.

0

당신이 당신의 app_controller.php 파일의 $uses 배열에 '방문자'와 '방문자'를 교환 한 것으로도 보인다

var $uses = array('Visitor.Visitors'); 

이어야

var $uses = array('Visitors.Visitor');