Can't say I get why you want to do it that way, but this should be
enough for a save method to do it (if you have the classes setup).
if ( $this->data['Product']['date'] ) {
$data['ProductRepository'] = $this->data['Product']
$this->ProductRepository->save($data['ProductRepository']);
}
On Jun 8, 4:56 pm, Darshan <[email protected]> wrote:
> How to move a record of a table to other one?
>
> I have one table called products and another table called
> productsrepository
> in my database. The table products has these fields:id, name. And the
> table productsrepository:id, name, date.
>
> I have a view in products where there is a product with its name and
> an input field
> where I introduce a date. And I want that when I submit the data, a
> function in my
> productscontroller moves this product, with its id and name and with
> the introduced date, to a new record in the table
> productsrepository.
> How can I do functionality like this?
>
> Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---