Programming and the time wasted on stupid things never ceases to amaze me. I am trying to import an .sql file which has the DB structure for my site. This is just an update to what is there while developing.
Problem is, MySQL seem to have a magical power that remembers deleted lines. The last line below has been deleted, however I get an error from MySQL saying the syntax is wrong for this line. How can I get an error for a line that doesn't even exist anymo开发者_运维知识库re? I have even rebooted to make sure nothing was hanging around in memory somewhere, but same thing. It magically thinks this line still exists.
I am using a program similar to PHPMYADMIN to input file.
`techspecial` text NOT NULL, `statuscode` varchar(25) NOT NULL, `tech` varchar(50) NOT NULL, ) ENGINE=MyISAM DEFAULT CHARSET=latin1
Any help is appreciated as this is just such a waste of valuable time.
the sql is with wrong syntax, take note on an extra ,
due to missing the line(s)
`tech` varchar(50) NOT NULL, /* <= the comma should never exist */
) ENGINE=MyISAM DEFAULT CHARSET=latin1
add back your missing line(s)
OR replace to :
`tech` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
have you tried to copy-paste the content of the query and execute it directly as a SQL query?? it should work.. if you still have a error then the problem is not your mysql.. try giving us the error message and the lines involved.
good luck!
精彩评论