1
I’m making a website with budget cart, with the CakePHP 2.x
.
I created a statistical table, I made the model of it all right but I will do an insertion in it, only when I enter the detail of some product.
When I get into the product detail I want to insert into it the product id and the id of the category to which it belongs, together with the date.
I managed to get him to insert in the model the line with the saveAll()
but he doesn’t take the id of either.
I would have to create an array somehow to receive this information?
Why I passed such an array on saveAll()
.
array(Estatisticas.produto_id = $produto['id'], Estatisticas.categoria_id = $produto['Categoria']['id]);