I have a question, about saving data in the database using CakePHP, when I need to manipulate with more than one table. I am creating a customer registration system and it has a system for registering login's and client's passwords, such as control panel, database, etc.
The database structure
Customers
Have fields with customer data, such as phone, email, etc.
Options
- id
- option (option name, such as control panel, database, etc.)
- user_aut (field to indicate if this option is going to have user fill)
- host_ativ (field to indicate if host / ip, as database ... control panel would not have this option
rel_op_client
- customer_id
- id_option
- password
- host
- user
I managed to solve the question of the form appearing data, in the client controller I put public $uses = array('Cliente','Opcao', 'RelInfoCliente');
and with this he can capture the data of the 3 tables ... but in case of saving the data of the form, which would be the best way to save the client save the data of the options, if I change the user name change in table rel_op_cliente