SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    convert mysql table from 4.1 to 4.0

    hi!!!
    i have a problem with uploading a table that i have exported from mysql version 4.1 to 4.0...
    this is the table...
    Code:
    CREATE TABLE `admin` (
      `ADMIN_ID` int(11) NOT NULL auto_increment,
      `username` varchar(40) collate latin1_general_ci default NULL,
      `password` varchar(6) collate latin1_general_ci default NULL,
      `vaznost` enum('0','1') collate latin1_general_ci default '0',
      `IsAktivan` enum('0','1') collate latin1_general_ci default '1' COMMENT '0 = nije aktivan 1=aktivan',
      PRIMARY KEY  (`ADMIN_ID`),
      UNIQUE KEY `password` (`password`),
      KEY `IDX_AUTH1` (`ADMIN_ID`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='0 je administrator za podatke, a 1 za cijelu bazu';
    i get the following error...
    error 1064 blabla mysql manual blabla near collate latin1_general_ci default NULL,....
    any suggestion about why this error comes up?
    thanx in avdance!

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I think it's the last line that is causing the error. Try changing it to this:

    Code:
    ) TYPE=MyISAM COMMENT='0 je administrator za podatke, a 1 za cijelu bazu';
    ERIK RIKLUND :: Yes, I've been gone quite a while.

  3. #3
    Chessplayer kleineme's Avatar
    Join Date
    Apr 2004
    Location
    Germany
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    you also have to delete all of those "collate latin1_general_ci" entries. In 4.1 you can specify the charset for every single table and even for every single column but in 4.0 only for the database as a whole
    Never ascribe to malice,
    that which can be explained by incompetence.
    Your code should not look unmaintainable, just be that way.


Bookmarks

Posting Permissions

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