I'm making a site with a buddy cart, with CakePHP 2.x
.
I created a statistics table, I made the model of it all right but I'll insert it into it, only when I go into the detail of some product.
When I enter the product detail I want to insert the product id and the category id to which it belongs, along with the date.
> I was able to get him to insert the line with the saveAll()
into the model, but he does not get the id from either.
Would I have to create an array somehow to receive this information?
Why did I pass an array like this to saveAll()
.
array(Estatisticas.produto_id = $produto['id'], Estatisticas.categoria_id = $produto['Categoria']['id]);