Hi all,

In my controller I am trying to update a single field in my
allowedviews table.  Not only is the record updating but a new record
is generated which is empty except for 'date_viewed'.  Could someone
check the below code and let me know if they see something wrong?

Thanks!

Accounts Controller:

$this->Account->Note->Sentmessage->AllowedView->recursive = -1;
$conditions = "AllowedView.note_id = '$id' AND AllowedView.user_id =
'$user_id'";
$myallowedview = $this->Account->Note->AllowedView->find($conditions);
$this->Account->Note->AllowedView->id = $myallowedview['AllowedView']
['id'];
$date = date("Y-m-d H:i:s", time()); //need to find current date
$this->Account->Conectnote->AllowedView->save("date_viewed", $date);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to