1

Attempted to import SQL file into phpmyadmin and this happenend... I am complete newb

SQL query:

--
-- Dumping data for table `fe`
INSERT INTO  `fe` (  `ID` ,  `userID` ,  `type` ,  `ip` ,  `note` )  
VALUES ( 31, 114,  'e',  '75.**.***.92',  'test' ) , --

Table structure for table gateway

 CREATE TABLE IF NOT EXISTS  `gateway` (

  `email` VARCHAR( 1024 ) NOT NULL ) ENGINE = MYISAM DEFAULT CHARSET =
 latin1;

MySQL said: Documentation

#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 'CREATE TABLE IF NOT EXISTS gateway ( email varchar(1024) NOT NULL ) ENGINE' at line 7

3
  • Where is the file you tried to import? Commented Aug 14, 2015 at 16:34
  • did you paste a dump file into phpmyadmin or something? Commented Aug 14, 2015 at 16:36
  • If you pasted those together, you need a ;, not a , to separate queries. Commented Aug 14, 2015 at 16:38

1 Answer 1

1
  CREATE TABLE IF NOT EXISTS  gateway (

        email VARCHAR( 1024 ) NOT NULL ) ENGINE = MYISAM DEFAULTCHARSET = latin1;

It looks right to me. Tried it here: http://sqlfiddle.com/#!9/10aa88

Maybe its with your MySQL version. What version are you using?

And as in the comments:

This:

INSERT INTO  `fe` (  `ID` ,  `userID` ,  `type` ,  `ip` ,  `note` )  
VALUES ( 31, 114,  'e',  '75.**.***.92',  'test' ) ,

should end with a ; and not ,

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.