我試圖創建一個社交網絡類型的網站,用戶可以發送/接收朋友請求。在我們當前的系統中,當用戶發送一個請求時,所需信息的一半被存儲在數據庫中,然後當用戶接受其餘的信息時,剩餘的信息被輸入。CakePHP HABTM關係問題
的relationships_users表ID,partyone,partytwo,expirydate,活性
具有問題IM是一旦用戶接受的請求,並且在到期日期,把其插入一個新列 - 並不在列與該用戶
here is my add function
if($this->request->is('post')){
$this->Relationship->create();
if ($this->Relationship->save($this->request->data))
{
$this->Session->setFlash('The relationship has been saved');
}
else { $this->Session->setFlash('The relationship could not be saved. Please, try again.'); }
}
}
here is my approve function
if($this->request->is('post')){
$this->Relationship->create();
$this->Relationship->save($this->request->data);
$this->Session->setFlash('The information has been saved');}
else{$this->Session->setFlash('The information couldnt be saved');}
IM假設我已經錯過了一些簡單的代碼,任何幫助,將不勝感激 其插入一個新列 - 不與用戶的關係*列