Jump to content

Instalation problems


sebastian_sabo

Recommended Posts

I have an issue during the instalation of a database

The message i get sounds like this:

Error

SQL query:

 

CREATE TABLE categories(

 

id int( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,

parent_id int( 11 ) DEFAULT '1' NOT NULL ,

name varchar( 25 ) DEFAULT '' NOT NULL ,

description varchar( 255 ) DEFAULT '' NOT NULL ,

PRIMARY KEY ( id ) ,

KEY parent_id( parent_id ) ,

KEY name( name )

);

 

 

 

MySQL said: 

 

#1067 - Invalid default value for 'id'

 

please help me to resolve this.

Link to comment
Share on other sites

If you have fields which are set up as NOT NULL (meaning a value must be present in the field), they cannot have a default value, thus the error you are having.

I don't think so... I can' default an INT to 6 without the field being NULL-able.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.