www.webdeveloper.com
Results 1 to 4 of 4

Thread: MySql Import not successful

  1. #1
    Join Date
    Mar 2005
    Posts
    262

    MySql Import not successful

    Can someone please tell me why this isn't being imported?

    PHP Code:
    -- --------------------------------------------------------
    -- 
    -- 
    Table structure for table `users`
    -- 
    CREATE TABLE `users` (
    `
    mIDint11 NOT NULL AUTO_INCREMENT ,
    `
    usernamevarchar32 ) default NOT NULL ,
    `
    displaynamevarchar40 NULL default '',
    `
    nicknamevarchar20 NULL default '',
    `
    passwordvarchar32 ) default NOT NULL ,
    `
    newPasswordvarchar32 ) default '',
    `
    uniadresvarchar100 ) default NOT NULL ,
    `
    mailadresvarchar100 ) default NOT NULL ,
    `
    termadrestext NOT NULL ,
    `
    actnumvarchar20 ) default NULL ,
    `
    userleveltinyint) default NULL ,
    `
    signupdatevarchar16 ) default NULL ,
    `
    lastloginvarchar16 ) default NULL ,
    `
    lastloginfailbigint20 ) default NULL ,
    `
    numloginfailtinyint) default NULL ,
    `
    warnleveltinyintNOT NULL default '0',
    `
    sessionIDvarchar32 ) default '',
    `
    locationvarchar100 NOT NULL default '',
    `
    lastClickINT default '0',
    `
    uIPvarchar100 NOT NULL default '',
    `
    rembervarchar32 ) default NULL ,
    `
    intereststext NOT NULL ,
    `
    clubstext NOT NULL ,
    `
    profiletext NOT NULL ,
    `
    msnvarchar40 NULL default '',
    `
    icqvarchar10 NULL default '',
    `
    aimvarchar40 NULL default '',
    `
    yimvarchar50 NULL default '',
    `
    telvarchar20 NULL default '',
    `
    mobilevarchar12 NOT NULL default '',
    `
    positionvarchar20 NOT NULL default '',
    `
    rolevarchar20 NOT NULL default '',
    `
    ageint) default NULL ,
    `
    websitevarchar150 ) default NULL ,
    `
    show_emailint) default '0',
    `
    avatarvarchar30 NOT NULL default 'no_pic.gif',
    `
    playercharNOT NULL default '',
    `
    selectedcharNOT NULL default 'no',
    PRIMARY KEY ( `mID` ) ,
    UNIQUE KEY `username` ( `username` ) ,
    UNIQUE KEY `displayname` ( `displayname` )
    TYPE MYISAM PACK_KEYS =0 AUTO_INCREMENT =124;

    MySQL saidDocumentation
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL,
                
    `displaynamevarchar(40NULL default '',
                `
    nicknamevarchar(' at line 3 

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    Code:
    `username` varchar( 32 ) default NOT NULL , 
    `displayname` varchar( 40 ) NULL default '',
    take out the default keyword for NOT NULL columns.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    Mar 2005
    Posts
    262
    Ok thank you I will try it, but instead of me going and just doing this, would you mind me telling me why this throws up errors please, thank you.

    Do you have any tips for database programming?

  4. #4
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    it's improper syntax, as per mysql.com
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles