我试图创建一个社交网络类型的网站,用户可以发送/接收朋友请求。在我们当前的系统中,当用户发送一个请求时,所需信息的一半被存储在数据库中,然后当用户接受其余的信息时,剩余的信息被输入。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假设我已经错过了一些简单的代码,任何帮助,将不胜感激 其插入一个新列 - 不与用户的关系*列