Professional Web Applications Themes

What is wrong with this command ? - MySQL

I made a mysqldump with version 3. I want to import this into version 4 but I get an error. Does anyone know why this doesn't work ? ----- mysql> CREATE TABLE mod_banner ( -> banner_id bigint(20) NOT NULL auto_increment, -> titel varchar(255) NOT NULL default '', -> mod bigint(20) NOT NULL default '0', -> id bigint(20) NOT NULL default '0', -> url varchar(255) NOT NULL default '', -> PRIMARY KEY (banner_id) -> ) TYPE=MyISAM; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax ...

  1. #1

    Default What is wrong with this command ?

    I made a mysqldump with version 3. I want to import this into version 4 but
    I get an error. Does anyone know why this doesn't work ?
    -----
    mysql> CREATE TABLE mod_banner (
    -> banner_id bigint(20) NOT NULL auto_increment,
    -> titel varchar(255) NOT NULL default '',
    -> mod bigint(20) NOT NULL default '0',
    -> id bigint(20) NOT NULL default '0',
    -> url varchar(255) NOT NULL default '',
    -> PRIMARY KEY (banner_id)
    -> ) TYPE=MyISAM;
    ERROR 1064 (42000): 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 'mod bigint(20) NOT NULL default '0',
    id bigint(20) NOT NULL default '0',
    url' at line 4

    Thank you for any help.
    R.Smits Guest

  2. #2

    Default Re: What is wrong with this command ?

    R.Smits schreef: 

    Hi,

    The problem is the column named 'mod'. MOD is also a MySQL operator, so
    you cannot use it as a column-name. Change it into a valid name and
    you're all set.

    HTH.
    Peter.
    --
    http://www.phpforums.nl
    Peter Guest

  3. #3

    Default Re: What is wrong with this command ?

    On Fri, 29 Sep 2006 01:03:23 +0200, Peter van Schie wrote: 
    >
    > Hi,
    >
    > The problem is the column named 'mod'. MOD is also a MySQL operator, so
    > you cannot use it as a column-name. Change it into a valid name and
    > you're all set.[/ref]

    Additionally, '0' is not a valid bigint default value. It's not valid
    for int or any other numeric type either. '0' is a character, not a
    number.

    --
    45. I will make sure I have a clear understanding of who is responsible for
    what in my organization. For example, if my general s up I will not
    draw my weapon, point it at him, say "And here is the price for failure,"
    then suddenly turn and kill some random underling. --Evil Overlord List
    Peter Guest

Similar Threads

  1. Acrobat 6.01: File Command disappears on Command Bar
    By Charles_Foskett@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 1
    Last Post: May 5th, 02:58 PM
  2. RUN/execute a Command-Line command from an ASP page.
    By Lucas Cowald in forum ASP Components
    Replies: 7
    Last Post: October 22nd, 01:08 PM
  3. What is wrong with this system "..." command?
    By Victor in forum PERL Miscellaneous
    Replies: 2
    Last Post: September 20th, 08:13 PM
  4. Windows Explorer Right Click Command (+ Custom Command Script)
    By lennySydney webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 1
    Last Post: September 6th, 07:59 PM
  5. Replies: 1
    Last Post: August 19th, 02:26 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139