Wednesday, June 30, 2010

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

i don´t understand this because after i enter my phpmyadmin i see an entry of the post but also i get this error undefined id but don´t know which id and i cant find which line nothing.

if i search in google it seems every one how try to use hasMany or hasOne or loadModel and used then this saving it or read it and they also got this error...

2010/6/30 Davor Ilic <webfacer@gmail.com>
is it possible that this not working like i do or is this an bug ?

2010/6/30 Davor Ilic <webfacer@gmail.com>

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: