just drop ur table and re create it with id as a primary key with an
auto_increment.

On Sep 23, 2:37 pm, forrestgump <[EMAIL PROTECTED]> wrote:
> I had a similar problem ORCC...check if the table you are inserting
> your data into has the primary key properly set...it appears you are
> using TYPE INT....make sure that it is the primary and is on
> "auto_increment"
> ....u usuallyy get duplicate entry errors when its not on
> auto_increment...
>
> forrestgump
>
> On Sep 23, 2:22 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > I noticed something similar a few weeks ago, just out of the blue.
> > I am not entirely sure what I did to fix it.
>
> > It was either:
> > -Going to the tried and tested first create(), then save($data).
> > -Or my favorite enemy the cache needing to visit the trash-can.
>
> > /Martin
>
> > On Sep 23, 7:28 am, ORCC <[EMAIL PROTECTED]> wrote:
>
> > > Thank you for answer.
>
> > > On 23 sep, 00:42, teknoid <[EMAIL PROTECTED]> wrote:
>
> > > > $this->Manufacturer->id = $id;
>
> > > > you can also save() the data without doing a set() first, i.e. $this-
>
> > > > >Manufacturer->save($this->data);
>
> > > This doesn't work either in my model-controller given in the previous
> > > posts. I can't figure where is the mistake, but I've have tested the
> > > following:
>
> > > - Set $this->Manufacturer->id = $id
> > > - Set $this->data['Manufacturer']['id'] = $id and invoke $this-
>
> > > >Manufacturer->save($this->data)
>
> > > With both alternatives, the mysql error of duplicate key appears and
> > > the query performed is an INSERT one.
>
> > > Regards.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to