freshJet Posted October 18, 2011 Report Posted October 18, 2011 I'm trying to upload phpvms_pilots via phpMyAdmin but keep receiving the following error: SQL query: INSERT INTO `freshje1_phpvms`.`phpvms_pilots` (`A`, `B`, `C`, `D`, `E`, `F`, `G`, `H`, `I`, `J`, `K`, `L`, `M`, `N`, `O`, `P`, `Q`, `R`, `S`, `T`, `U`, `V`, `W`, `X`, `Y`) VALUES (1, 'Iain', 'Robb', 'i_robb@tiscali.co.uk', 'FRX', 'SCOTLAND', 'EGPF', '4b480c21f898ddfccf616da93c2b5760', '1ccc2062de1101f0fb20d4f7033d3f20', 'new_signature.png', '2011-10-18', 0, 1.5, 0, 0, 0, 1, 'Trainee', 1, 1, 0, '2010-09-21 11:05:16', '2011-07-21 02:59:24', '81.129.82.248', 'CEO'), (4, 'Jim', 'Parks', 'ljparks97@yahoo.com', 'FRX', 'US', 'EGAA', '5379b2f39c46474e1b09924aa7b71b2f', 'fd8cf493db5a9c2e3c03e76d722518f7', 'new_signature.png', '0000-00-00', 0, 0, 0, 0, 0, 1, 'Trainee', 1, 1, 0, '2011-02-22 16:32:29', '0000-00-00 00:00:00', '75.62.45.166', NULL), (17, 'Jake', 'Doody', 'ibike@live.co.uk', 'FRX', 'GB', 'EGAA', 'fa685865e266a59b4671c48b06c339ac', '47a48c1d3b3b184f99f908b512027bc0', 'new_signature.png', '2011-10-08', 0, 0, 0, 0, 0, 1, 'Trainee', 1, 1, 0, '2011-02-28 13:51:38', '0000-00-00 00:00:00'[...] MySQL said: #1054 - Unknown column 'A' in 'field list' Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 HI thats the wrong table structure Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 You need this, INSERT INTO `phpvms_pilots` (`pilotid`, `firstname`, `lastname`, `email`, `code`, `location`, `hub`, `password`, `salt`, `bgimage`, `lastlogin`, `totalflights`, `totalhours`, `totalpay`, `payadjust`, `transferhours`, `rankid`, `rank`, `ranklevel`, `confirmed`, `retired`, `joindate`, `lastpirep`, `lastip`, `comment`) Quote
freshJet Posted October 18, 2011 Author Report Posted October 18, 2011 OK, but how do I upload the file then? Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 you can do it two ways, copy paste in to phpmyadmin or upload the file, What you need it this, INSERT INTO `phpvms_pilots` (`pilotid`, `firstname`, `lastname`, `email`, `code`, `location`, `hub`, `password`, `salt`, `bgimage`, `lastlogin`, `totalflights`, `totalhours`, `totalpay`, `payadjust`, `transferhours`, `rankid`, `rank`, `ranklevel`, `confirmed`, `retired`, `joindate`, `lastpirep`, `lastip`, `comment`)VALUES (1, 'Iain', 'Robb', 'i_robb@tiscali.co.uk', 'FRX', 'SCOTLAND', 'EGPF', '4b480c21f898ddfccf616da93c2b5760', '1ccc2062de1101f0fb20d4f7033d3f20', 'new_signature.png', '2011-10-18', 0, 1.5, 0, 0, 0, 1, 'Trainee', 1, 1, 0, '2010-09-21 11:05:16', '2011-07-21 02:59:24', '81.129.82.248', 'CEO'); See if that lets you import. Usually you can empty the table and just import the sql file but im not sure how you managed to get the A B C etc Quote
freshJet Posted October 18, 2011 Author Report Posted October 18, 2011 im not sure how you managed to get the A B C etc Ahhh... that was from MS Excel - should I check the first line as head box? Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 You cant use excel to import pilots to the site i dont think. Quote
freshJet Posted October 18, 2011 Author Report Posted October 18, 2011 Well I exported as Excel and there was an option to import it as it too... Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 If your ever dealing with sql just export as sql, excel does some wired formatting that screws things up. What i would suggest os to try that what i pasted above and debug from the results. Quote
freshJet Posted October 18, 2011 Author Report Posted October 18, 2011 So how do I edit the fields this way? Can I have an example please? Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 Its above there, try and import that and see what error messages you get. http://forum.phpvms.net/topic/6103-phpmyadmin-upload-error/page__view__findpost__p__40975 Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 It may not let you do that as the first value is set auto incremental, you could try with and without to see what happens. Quote
freshJet Posted October 18, 2011 Author Report Posted October 18, 2011 OK, so I need to do that for every new entry? Quote
Moderators mark1million Posted October 18, 2011 Moderators Report Posted October 18, 2011 No you can copy that file and use the first insert into but use all the values ending the statement with a ; you should be able to import the lot. Quote
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.