I get it now!! Using 'products_id' will not work with Cake. You have
to use 'id' as your field name.
--~--~-~--~~~---~--~~
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@
Hi,
I am not having succes getting my component to update a record.
Insert works with this code if I don't pass a $product_id. How do I
force an update?
class CostsController extends AppController
{
var $name = 'costs';
var $components=array("Findcost");
function index()
{
Thank you both for your assistance. Last night I was just trying to
mock up what I could do. The reason why I want to work solely in my
component is for reuse. I want to be able to use this component in
more than 1 controller, but the controllers will use this component in
different ways.
I wi
perhaps your cost calculation should be in the products model.
it's not taboo to put custom methods into the model, as long as it is
very closely related to the model data.
if you absolutely have to call it from the controller then give your
component a controller param, and in the calling contro
Hi Bill,
First a double check: Is the component Findcost only related to the
controller Costs? If so it might be easier to manage and cleaner code
to write the functionality into a method on the Costs controller.
If it is used by more than one controller then I think will do what you
want:
clas
Is there a way to access the Model, to make Database calls inside of a
component?
class CostsController extends AppController
{
var $name = 'Costs';
var $components=array("Findcost");
function index()
{
//Do i send a reference to model this way?
$this->Component->calcu