Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2009
    Posts
    3

    Unanswered: 1064 error, please help

    when trying to import my sql file i get the below error. Can someone please point out whats causing the issue for me? (sorry, im a noob)


    #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 '?--
    -- Tabel structuur voor tabel `bescherming`
    --

    CREATE TABLE `bescher' at line 1

    here is what im trying to insert
    SQL query:

    --
    -- Tabel structuur voor tabel `bescherming`
    --
    CREATE TABLE `bescherming` (
    `id` int( 1 ) NOT NULL AUTO_INCREMENT ,
    `type` int( 1 ) NOT NULL default '0',
    `minuten` int( 255 ) NOT NULL default '0',
    `prijs` int( 255 ) NOT NULL default '0',
    `naam` varchar( 255 ) NOT NULL default '',
    `time` int( 255 ) NOT NULL default '0',
    PRIMARY KEY ( `id` )
    ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =4

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the problem is the question mark

    the error message tells you exactly where to look
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2009
    Posts
    3
    thanx for replyin r937

    thats what i thought when i first saw the error code, but when checkin the code, there is no ? at line 1

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    just wondering if it doesn't like the -- comment symbol. as a suggestion try it without the -- comments
    or mebbe there is an unprintable character for whatever reason prefixing the first --
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Dec 2009
    Posts
    3
    i thought maybe they were there due to the size of the sql file, to break it up so its easy to work on, theres roughly 100-150 tables to be inserted, most of them larger than the one table shown

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by prozak View Post
    there is no ? at line 1
    some other character then?

    you can safely remove all comment lines (in a text editor, for example)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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