If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > 1064 error, please help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-04-09, 02:27
prozak prozak is offline
Registered User
 
Join Date: Dec 2009
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 12-04-09, 06:55
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
the problem is the question mark

the error message tells you exactly where to look
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-04-09, 11:10
prozak prozak is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 12-04-09, 11:34
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 12-04-09, 11:42
prozak prozak is offline
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old 12-04-09, 12:04
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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)
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On