Maybe I'm wrong, but I think you should just use the $templetter array, not $this->data->templetter. Check the contents of that array, but I think it should be $temptext = $templetter['Letter']['text']; If not, check print_r($templetter); to see the array.
Eric
On 10/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi there,
maybe the answer is very simple, but I don't get a solution for my
problem.
I have 2 table: "logs" (with log_id and text as columns) and "letters"
(with letter_id and text as columns).
Now I would like to copy the letter with the letter_id 4 to my logs
table.
I have tried this:
$tempid=4;
$templetter = $this->Letter->findById($tempid);
$temptext= $this->data->templetter['text'];
$this->Logs->saveField('text',$temptext);
But this doesn't work and also seems too complicated, I think.
Thanks
Felix
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- Re: copy field from one table to another Eric C Blount
- Re: copy field from one table to another [EMAIL PROTECTED]