Web Analytics Made Easy -
StatCounter Error in creating mySQL table - CodingForum

Announcement

Collapse
No announcement yet.

Error in creating mySQL table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in creating mySQL table

    I am using phpMyAdmin and when I tried to create a table, it came up saying there was an error

    This is the code produced

    CREATE TABLE `artists` (

    `ID` VARCHAR( 50 ) NOT NULL ,
    `Genre` VARCHAR( 50 ) NOT NULL ,
    `BandName` LONGBLOB( 50 ) NOT NULL ,
    `URL` VARCHAR( 50 ) NOT NULL ,
    `influence1` VARCHAR( 50 ) NOT NULL ,
    `influence2` VARCHAR( 50 ) NOT NULL ,
    `influence3` VARCHAR( 50 ) NOT NULL ,
    `influence4` VARCHAR( 50 ) NOT NULL ,
    `Address` VARCHAR( 50 ) NOT NULL ,
    `Email` VARCHAR( 50 ) NOT NULL ,
    `Password` VARCHAR( 50 ) NOT NULL ,
    `Country` VARCHAR( 50 ) NOT NULL ,
    `Artist1` VARCHAR( 50 ) NOT NULL ,
    `Artist2` VARCHAR( 50 ) NOT NULL ,
    `Artist3` VARCHAR( 50 ) NOT NULL ,
    `Artist4` VARCHAR( 50 ) NOT NULL ,
    `Artist5` VARCHAR( 50 ) NOT NULL ,
    `Artist6` VARCHAR( 50 ) NOT NULL ,
    `Instrument1` VARCHAR( 50 ) NOT NULL ,
    `Instrument2` VARCHAR( 50 ) NOT NULL ,
    `Instrument3` VARCHAR( 50 ) NOT NULL ,
    `Instrument4` VARCHAR( 50 ) NOT NULL ,
    `Instrument5` VARCHAR( 50 ) NOT NULL ,
    `Instrument6` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY ( `ID` ) ,
    INDEX ( `BandName` , `Email` )
    )

    Thanks. This is really important
    Dave

  • #2
    it would help if you gave us the error it gave you
    php & asp tutorials - the birthplace - biorust - photoshop and web technologies

    Comment


    • #3
      It's probably the

      `BandName` LONGBLOB( 50 ) NOT NULL ,


      Either set

      `BandName` VARCHAR( 50 ) NOT NULL ,

      or

      `BandName` LONGBLOB NOT NULL ,



      But i fail to see the point to use a longlob if you only need 50 posotions it in .... Longblobs are realy bif fields that eat up huge chunks of systemresource when you fetch the records, because the mySQL server reserves memory for 4294967295 positions, sou you should not use this type, unless you plan to store bandnames in there with that number of characters (quite unlikely)
      Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

      Comment

      Working...
      X