Jump to content

[SOLVED] Problems with two tables #1067 Invalid default value for


interspire09

Recommended Posts

Hello all,

 

I have a script that uses mysql and am having trouble inserting two tables into my database.  :facewall: copies of the code are below... pleaseee tell me what im doing wrong.... THANK YOU FOR YOUR HELP..

 

ERROR 1: Error SQL query:

# Create table structure for 'tmpmember' table
CREATE TABLE tmpmember(
tmpmemberID int( 11 ) NOT NULL AUTO_INCREMENT ,
title varchar( 80 ) NOT NULL default '',
firstname varchar( 80 ) NOT NULL default '',
lastname varchar( 80 ) NOT NULL default '',
email varchar( 80 ) NOT NULL default '',
address varchar( 80 ) NOT NULL default '',
suburb varchar( 80 ) NOT NULL default '',
state varchar( 80 ) NOT NULL default '',
country varchar( 80 ) NOT NULL default '',
postcode varchar( 11 ) NOT NULL default '',
mobile varchar( 80 ) NOT NULL default '',
phone varchar( 80 ) NOT NULL default '',
fax varchar( 80 ) NOT NULL default '',
username varchar( 15 ) NOT NULL default '',
PASSWORD varchar( 15 ) NOT NULL default '',
membership int( 2 ) NOT NULL default '',
payment int( 2 ) NOT NULL default '',
creation_date bigint( 14 ) NOT NULL ,
PRIMARY KEY ( tmpmemberID ) ,
UNIQUE (
tmpmemberID
)
) TYPE = MYISAM ;

 

MySQL said: Documentation

#1067 - Invalid default value for 'membership'

 

 

SECOND TABLE WITH ERROR:

Error  SQL query:

# Create table structure for 'member' table
CREATE TABLE member(
memberID int( 11 ) NOT NULL AUTO_INCREMENT ,
title varchar( 80 ) NOT NULL default '',
firstname varchar( 80 ) NOT NULL default '',
lastname varchar( 80 ) NOT NULL default '',
email varchar( 80 ) NOT NULL default '',
address varchar( 80 ) NOT NULL default '',
suburb varchar( 80 ) NOT NULL default '',
state varchar( 80 ) NOT NULL default '',
country varchar( 80 ) NOT NULL default '',
postcode varchar( 11 ) NOT NULL default '',
mobile varchar( 80 ) NOT NULL default '',
phone varchar( 80 ) NOT NULL default '',
fax varchar( 80 ) NOT NULL default '',
membership int( 2 ) NOT NULL default '',
payment int( 2 ) NOT NULL default '',
startdate bigint( 14 ) NOT NULL default 0,
enddate bigint( 14 ) NOT NULL default 0,
userID int( 11 ) NOT NULL ,
PRIMARY KEY ( memberID ) ,
UNIQUE (
memberID
)
) TYPE = MYISAM ;

MySQL said: Documentation

#1067 - Invalid default value for 'membership'

 

 

I am using the following on my box

CENTOS 5.3 i686 standard

PHP version 4.4.9 

MySQL version 5.0.77-community

 

 

 

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.