items table ID column
Hi, Just wondering... shouldn't then field ID in the items table be autoincrement?
In my items table it's not...
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| id | int(11) | NO | | 0 | |
| datetime | datetime | NO | | NULL | |
| title | text | NO | | NULL | |
| content | longtext | NO | | NULL | |
...and in my table of 15000 items...
mysql> SELECT COUNT(id) from items where id=0;
+-----------+
| COUNT(id) |
+-----------+
| 8960 |
+-----------+
...more than half have ID=0. This isn't very helpful if I want to use this field as a foreign key.
Anyone else have this issue? Perhaps my db setup is incorrect?
Thanks!