[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Mysql - autoincrement primary number
Alma Nuker <alma@youramigo.com> writes:
> Thanks Jonathan for your response.
>
> > I am trying to set mysql db table, and I want primary key to be
> > autincremented every time when I add new record to db table.
>
> >Don't set the field in your form. Setting an auto increment field
> causes
> >your value to be used instead. For the increment to work, the field
> should
> >be null.
>
> I remove it from form and then I got following message in error log:
>
> "No key 'my_id' found for function='insert' table='mydb'
>
>
> I tried to to do following:
>
> <INPUT TYPE="hidden" NAME="my_id" VALUE="">
That is OK. You just need to set
Database mydb AUTO_SEQUENCE 1
in your catalog.cfg.
Ciao
Racke
--
Think of it !
For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)