login system
|
|||
|
Rank: ? (2)
Member #: 29788 |
hi all
when i go in to phpmyadmin and input this in to SQL: CREATE TABLE users ( id int(10) DEFAULT '0' NOT NULL auto_increment, username varchar(40), password varchar(50), regdate varchar(20), email varchar(100), website varchar(150), location varchar(150), show_email int(2) DEFAULT '0', last_login varchar(20), PRIMARY KEY(id)) i get this error: #1067 - Invalid default value for 'id' help » Post edited 2008-08-16, 05:02am by thebot.
|
||
|
|||
|
|||
|
Rank: ? (44)
Member #: 22823 |
Hi there,
Fix: remove the DEFAULT definition from the 'id' column entirely. Why: you can't use the DEFAULT definition on an auto_increment column. Auto_increment columns automatically start counting at 0 anyway. The code should look like this: CREATE TABLE users ( id int(10) NOT NULL auto_increment, username varchar(40), password varchar(50), ... That's the simplest fix. ^_^ -sw
We put the fun in fungus.
|
||
|
|||
|
|||
|
Rank: ? (2)
Member #: 29788 |
o ok
well i fixed it now because i posted this Subject on the 2008-08-16 but thank you lol |
||
|
Please login or register to post a reply.