The only thing that I can think of is that your id column has reached
its limit (something over 2 billion) and has rolled back to zero. But
I doubt that's the problem.

You could try dropping and recreating the users table (or just the id column).

On Wed, Jul 11, 2012 at 11:59 PM, mohit kumar <[email protected]> wrote:
> mysql> DESCRIBE users;
> +------------+-------------+------+-----+---------+----------------+
> | Field      | Type        | Null | Key | Default | Extra          |
> +------------+-------------+------+-----+---------+----------------+
> | id         | int(11)     | NO   | PRI | NULL    | auto_increment |
> | username   | varchar(50) | YES  |     | NULL    |                |
> | password   | varchar(50) | YES  |     | NULL    |                |
> | role       | varchar(20) | YES  |     | NULL    |                |
> | experience | int(11)     | NO   |     | NULL    |                |
> | created    | datetime    | YES  |     | NULL    |                |
> | modified   | datetime    | YES  |     | NULL    |                |
> +------------+-------------+------+-----+---------+----------------+
> 7 rows in set (0.01 sec)
>
>
> On Thu, Jul 12, 2012 at 2:01 AM, lowpass <[email protected]> wrote:
>>
>> Are you setting the id in the data array for some reason?
>>
>> It looks like you're using mysql. What is the output of "DESCRIBE
>> users;" in mysql terminal?
>>
>> On Wed, Jul 11, 2012 at 3:10 PM, mohit kumar <[email protected]> wrote:
>> > yes., auto increment is set for id
>> >
>> > On Wed, Jul 11, 2012 at 7:21 PM, Max Dörfler
>> > <[email protected]>
>> > wrote:
>> >>
>> >> Is the Auto Increment attribute set for the ID column?
>> >>
>> >>
>> >> On 07/11/2012 03:39 PM, mohit kumar wrote:
>> >>
>> >> Hi Folks,
>> >>
>> >> I created an add action for users,
>> >> I am trying to register them using this action. Everything is going
>> >> fine,
>> >> the data is being submitted, the passwords are being hash and if I
>> >> check the
>> >> registration is happening. But I am getting the following error.
>> >>
>> >>> Integrity constraint violation: 1062 Duplicate entry '0' for key
>> >>> 'PRIMARY'
>> >>
>> >>
>> >> I googled it to found a link which states that
>> >>
>> >>> The only way we could fix it, is by rebuilding the entire database
>> >>> from
>> >>> scratch.
>> >>>
>> >>> Dropping all tables and reloading them from a backup.
>> >>
>> >>
>> >> I tried that also , still getting that error.
>> >>
>> >> Thanks for help in advance
>> >>
>> >> --
>> >> Best Regards,
>> >> Mohit Kumar
>> >>
>> >>
>> >> --
>> >> Our newest site for the community: CakePHP Video Tutorials
>> >> http://tv.cakephp.org
>> >> Check out the new CakePHP Questions site http://ask.cakephp.org and
>> >> help
>> >> others with their CakePHP related questions.
>> >>
>> >>
>> >> To unsubscribe from this group, send email to
>> >> [email protected] For more options, visit this
>> >> group
>> >> at http://groups.google.com/group/cake-php
>> >>
>> >>
>> >>
>> >> --
>> >> Our newest site for the community: CakePHP Video Tutorials
>> >> http://tv.cakephp.org
>> >> Check out the new CakePHP Questions site http://ask.cakephp.org and
>> >> help
>> >> others with their CakePHP related questions.
>> >>
>> >>
>> >> To unsubscribe from this group, send email to
>> >> [email protected] For more options, visit this
>> >> group
>> >> at http://groups.google.com/group/cake-php
>> >
>> >
>> >
>> >
>> > --
>> > Best Regards,
>> > Mohit Kumar
>> >
>> >
>> > --
>> > Our newest site for the community: CakePHP Video Tutorials
>> > http://tv.cakephp.org
>> > Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> > others with their CakePHP related questions.
>> >
>> >
>> > To unsubscribe from this group, send email to
>> > [email protected] For more options, visit this group
>> > at
>> > http://groups.google.com/group/cake-php
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/cake-php
>
>
>
>
> --
> Best Regards,
> Mohit Kumar
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to