0
我創建了一個MO控制器的簡單方法,像這樣:調用自定義的CakePHP控制器的方法結果
public function getAddresses() {
$addresses = $this->Adres->find('all');
return $addresses;
}
當我稱這種現象控制器,就像這樣:
$this->loadModel('Adres');
$sponsors = $this->Adres->getAddresses();
我得到這個奇怪的錯誤:
Database Error Error: SQLSTATE[42000]: Syntax error or access violation: 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 'getAddresses' at line 1 SQL Query: getAddresses
我做錯了什麼?
謝謝,你幫了我很多! – matheusvmbruno