Auto Increment Problem

Auto Increment Problem

am 05.12.2009 19:19:12 von Victor Subervi

--0016364275f7e3eede0479ff42cb
Content-Type: text/plain; charset=ISO-8859-1

Hi;

mysql> insert into categories (Category, Parent) values ('test', NULL);
ERROR 1062 (23000): Duplicate entry '0' for key 1
mysql> describe categories;
+----------+-----------------+------+-----+---------+------- +
| Field | Type | Null | Key | Default | Extra |
+----------+-----------------+------+-----+---------+------- +
| ID | int(3) unsigned | NO | PRI | NULL | |
| Category | varchar(40) | YES | | NULL | |
| Parent | varchar(40) | YES | | NULL | |
+----------+-----------------+------+-----+---------+------- +
3 rows in set (0.00 sec)

Why the error?
TIA,
Victor

--0016364275f7e3eede0479ff42cb--

Re: Auto Increment Problem

am 05.12.2009 19:23:40 von Victor Subervi

--0015175770eae1747b0479ff5201
Content-Type: text/plain; charset=ISO-8859-1

Oops. Never mind.
V

On Sat, Dec 5, 2009 at 1:19 PM, Victor Subervi wrote:

> Hi;
>
> mysql> insert into categories (Category, Parent) values ('test', NULL);
> ERROR 1062 (23000): Duplicate entry '0' for key 1
> mysql> describe categories;
> +----------+-----------------+------+-----+---------+------- +
> | Field | Type | Null | Key | Default | Extra |
> +----------+-----------------+------+-----+---------+------- +
> | ID | int(3) unsigned | NO | PRI | NULL | |
> | Category | varchar(40) | YES | | NULL | |
> | Parent | varchar(40) | YES | | NULL | |
> +----------+-----------------+------+-----+---------+------- +
> 3 rows in set (0.00 sec)
>
> Why the error?
> TIA,
> Victor
>

--0015175770eae1747b0479ff5201--