Firestorm3d Posted July 17, 2008 Share Posted July 17, 2008 So im trying to get this insert to work INSERT INTO astro_bases (baseID, coord, Urban, Solar, Gas, Fusion, Antimatter, Research, Metal, Crystals, Robotic, Shipyards, Orbital Shipyards, Spaceports, Command, Nanite, Androids, Economic, Terraform, Multi-Level, Orbital Base, Jump Gate, Barracks, Laser, Missile, Plasma, Ion, Photon, Disruptor, Deflection, Planetary Shield, Planetary Ring, playerID) VALUES ( 47889, 'C25:44:61:31', 24, 0, 0, 18, 10, 0, 25, 25, 20, 20, 2, 25, 18, 15, 10, 16, 19, 8, 5, 1 10, 15, 18797) but it keeps hanging up at 'Shipyards, Orbital Shipyards, Spaceports, Command, Nanite, Androids, Economic, Terraform, Multi-Lev' it says. baseID tinyint(50) No coord varchar(50) No Urban tinyint(25) Yes NULL Solar tinyint(25) Yes NULL Gas tinyint(25) Yes NULL Fusion tinyint(25) Yes NULL Antimatter tinyint(25) Yes NULL Research tinyint(25) Yes NULL Metal tinyint(25) Yes NULL Crystals tinyint(25) Yes NULL Robotic tinyint(25) Yes NULL Shipyards tinyint(25) Yes NULL Orbital Shipyards tinyint(25) Yes NULL Spaceports tinyint(25) Yes NULL Command tinyint(25) Yes NULL Nanite tinyint(25) Yes NULL Androids tinyint(25) Yes NULL Economic tinyint(25) Yes NULL Terraform tinyint(25) Yes NULL Multi-Level tinyint(25) Yes NULL Orbital Base tinyint(25) Yes NULL Jump Gate tinyint(25) Yes NULL Biosphere Mod tinyint(25) Yes NULL Barracks tinyint(25) Yes NULL Laser tinyint(25) Yes NULL Missile tinyint(25) Yes NULL Plasma tinyint(25) Yes NULL Ion tinyint(25) Yes NULL Photon tinyint(25) Yes NULL Disruptor tinyint(25) Yes NULL Deflection tinyint(25) Yes NULL Planetary Shield tinyint(25) Yes NULL Planetary Ring tinyint(25) Yes NULL playerID tinyint(25) No date timestamp No CURRENT_TIMESTAMP that is the table im trying to insert into. Quote Link to comment https://forums.phpfreaks.com/topic/115210-insert-query-issue/ Share on other sites More sharing options...
Zwiter Posted July 17, 2008 Share Posted July 17, 2008 You dont have the same number of attribute and value. Z. Quote Link to comment https://forums.phpfreaks.com/topic/115210-insert-query-issue/#findComment-592455 Share on other sites More sharing options...
PFMaBiSmAd Posted July 17, 2008 Share Posted July 17, 2008 Some of your column names contain spaces and dashes. These require special handling. I recommend that you change these to under_scores to avoid needing to use special syntax to handle them. Quote Link to comment https://forums.phpfreaks.com/topic/115210-insert-query-issue/#findComment-592491 Share on other sites More sharing options...
fenway Posted July 17, 2008 Share Posted July 17, 2008 Or use back-ticks... but better to change the name. Quote Link to comment https://forums.phpfreaks.com/topic/115210-insert-query-issue/#findComment-592595 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.