我已經在我的模型以下情況: -a "users" table, with "id" as primary key
-a "stores" table with "id" as primary key, and "users_id" as foreign key
-a "promos" table with "id" as primary key, and "stores_id" as fore
我是一個CakePHP的2.3工作..這裏是我的代碼 class MessagesController extends AppController{
public $helpers = array('Time');
public function messages(){
$datetime= $this->Message->getDatetime($userid)
我的單元測試非常簡單。我的問題不像'測試/查詢有什麼問題',因爲它是如何通過獲取生成的SQL查詢來在APP/test.php中解決這些問題。 以下是我的單元測試: public function testMatchingPasswords() {
debug($this->User->save($this->genericSaveData));
}
而且我得到以下錯誤: SQLST