-=Stu=- Posted August 30, 2003 Share Posted August 30, 2003 Hi. I am trying to create some tables to store data retrieved from an XML parser. My hosting company restricts users to the command line interface so I can\'t make use of any GUI. I am logging into the server using: mysql -h mysql.server.co.uk -u myUsername -p stuart I then have the file which I\'ve pasted below (called query.sql). I use e to open the editor and import the file and then return to the main menu. When I then run the query using g I get the error below : ERROR 1064: You have an error in your SQL syntax near \'; CREATE TABLE ps_charinfo ( worldid int(3) NOT NULL default \'0\', charid int\' at line 41 mysql> Can anyone tell me what I\'m doing wrong ? Thanks for any help, Stuart. CREATE TABLE ps_charinfo ( worldid int(3) NOT NULL default \'0\', charid int(10) NOT NULL default \'0\', worldname varchar(20) NOT NULL default \'\', username varchar(30) NOT NULL default \'\', empire varchar(30) NOT NULL default \'\', outfitid int(10) NOT NULL default \'0\', outfit varchar(30) NOT NULL default \'\', charface varchar(30) NOT NULL default \'\', commandrank int(1) NOT NULL default \'0\', battlerank int(2) NOT NULL default \'0\', outfittitle varchar(20) NOT NULL default \'\', outfitpoints int(10) NOT NULL default \'0\', hackedfacilities int(10) NOT NULL default \'0\', vanusovereigntykills int(10) NOT NULL default \'0\', newconglomeratekills int(10) NOT NULL default \'0\', terranrepublickills int(10) NOT NULL default \'0\', totalenemykills int(10) NOT NULL default \'0\', lastloggedon date default NULL, totalcertifications int(2) NOT NULL default \'0\', certification0 varchar(30) default NULL, certification1 varchar(30) default NULL, certification2 varchar(30) default NULL, certification3 varchar(30) default NULL, certification4 varchar(30) default NULL, certification5 varchar(30) default NULL, certification6 varchar(30) default NULL, certification7 varchar(30) default NULL, certification8 varchar(30) default NULL, certification9 varchar(30) default NULL, certification10 varchar(30) default NULL, certification11 varchar(30) default NULL, certification12 varchar(30) default NULL, certification13 varchar(30) default NULL, certification14 varchar(30) default NULL, certification15 varchar(30) default NULL, KEY charid (charid) ) TYPE=MyISAM; CREATE TABLE ps_outfit ( worldid smallint(6) NOT NULL default \'0\', outfitid int(10) NOT NULL default \'0\', worldname varchar(20) NOT NULL default \'\', empire varchar(20) NOT NULL default \'\', outfit varchar(100) NOT NULL default \'\', datecreated varchar(20) NOT NULL default \'\', outfitleaderid int(10) NOT NULL default \'0\', outfitleader varchar(20) NOT NULL default \'\', outfitpoints int(10) NOT NULL default \'0\', outfitlogo varchar(20) NOT NULL default \'\', contactinfo varchar(30) NOT NULL default \'\', membercount int(5) NOT NULL default \'0\', title7 varchar(30) NOT NULL default \'\', title6 varchar(30) NOT NULL default \'\', title5 varchar(30) NOT NULL default \'\', title4 varchar(30) NOT NULL default \'\', title3 varchar(30) NOT NULL default \'\', title2 varchar(30) NOT NULL default \'\', title1 varchar(30) NOT NULL default \'\', title0 varchar(30) NOT NULL default \'\', KEY outfitid (outfitid) ) TYPE=MyISAM; CREATE TABLE ps_outfitroster ( charid int(10) NOT NULL default \'0\', name varchar(30) NOT NULL default \'\', title varchar(20) NOT NULL default \'\', battlerank int(2) NOT NULL default \'0\', points int(10) NOT NULL default \'0\', lastloggedin date default NULL, KEY charid (charid) ) TYPE=MyISAM; CREATE TABLE ps_ranks ( rankid int(2) NOT NULL default \'0\', rank varchar(30) NOT NULL default \'\', KEY rankid (rankid) ) TYPE=MyISAM; CREATE TABLE ps_updatetime ( timeid int(1) NOT NULL default \'0\', updatetime varchar(30) default NULL, KEY timeid (timeid) ) TYPE=MyISAM; INSERT INTO ps_updatetime VALUES (0, \'0\'); Quote Link to comment Share on other sites More sharing options...
Jan Posted August 30, 2003 Share Posted August 30, 2003 i know that doesnt help, but all i did was copy and paste it into my local PhpMyAdmin and it worked... Sorry Quote Link to comment Share on other sites More sharing options...
-=Stu=- Posted August 30, 2003 Author Share Posted August 30, 2003 Hehe no probs. Its really annoying that my hosting doesn\'t give remote access. Their excuse is security which sounds like an easy get out, since but other hostings I\'ve used before allow remote access. Thanks for letting me know that it at least works in PhpMyAdmin. I\'ve tried everything so far. I even just tried doing CREATE TABLE ps_charinfo and on the first occassion got the same error but then on the second occassion it worked. Very annoying. Thanks for your help, Stuart. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.