Wednesday, June 30, 2010

Re: Undefined id and don´t know why....

its only if i add this line

if(!empty($product)) {

$this->loadModel('Kattaxonomie');

   

$counted_katId = count($this->data['Kat']);

#pr($counted_katId);

for($i=0;$i<$counted_katId;$i++) {

$this->Kattaxonomie->set(array(

'product_id' => $this->Product->id,

'kat_id' => $this->data['Kat']['kat_id'][$i]

));

$this->Kattaxonomie->save();

}


i will understand which id it meen. but if i only save the product in it´s Table it works but if i ad this model Katttaxonomie and try to save this two vars in this Table i got this Debugerror...


2010/6/30 Zaky Katalan-Ezra <procsharp@gmail.com>
Did you bake the initial view?
If yes did it work before your changes?
Attach your create table script

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: