Cless Posted July 11, 2007 Share Posted July 11, 2007 Hello. Back with another question. Yay. Um, I've been working on a Registration Script for some time now... However, the data will not insert. It says "Column count doesn't match value count at row 1". I'm not really sure what the problem is... $data1= "INSERT INTO Users ( Sprite, Sprite1, Sprite2, Username, Password, UserGroup, IP, Title, EXP, NEXP, Level, Poké, Email, Gender, Score, ContestLevel, ContestEXP, ContestNEXP ) VALUES ( '$RE_Sprite', '$RE_Sprite1', '$RE_Sprite2', '$RE_Username', '$RE_Password', '$RE_UserGroup', '$RE_IP', '$RE_Title', '$RE_EXP', '$RE_NEXP', '$RE_Level', '$RE_Poké', '$RE_Email', '$RE_Gender', '$RE_Score', '$RE_ContestLevel', '$RE_ContestEXP', '$RE_ContestNEXP' )"; $data2= "INSERT INTO Pokémon ( P_Num, P_Name, P_Level, P_HP, P_CHP, P_ATK, P_DEF, P_SPLATK, P_SPLDEF, P_SPD, P_EXP, P_NEXP, P_Type1, P_Type2, P_Owner, P_Gender, P_Item, P_ContestLevel, P_ContestEXP, P_ContestNEXP, P_Sprite1, P_Sprite2, P_Sprite3, P_Sprite, P_Poké ) VALUES( '$P_Num', '$P_Name', '$P_Level', '$P_HP', '$P_CHP', '$P_ATK', '$P_DEF', '$P_SPLATK', '$P_SPLDEF', '$P_SPD', '$P_EXP', '$P_NEXP', '$P_Type1', '$P_Type2', '$P_Owner', '$P_Gender', '$P_Item', '$P_ContestLevel', '$P_ContestEXP', '$P_Sprite1', '$P_Sprite2', '$P_Sprite3', '$P_Sprite', '$P_Poké' )"; } //Complete Data Insertion mysql_query($data1,$connect) or die ("An error has occurred while attempting to create your user information. Please email darkness55@msn or tpmrpg@aol.com with this information: " . mysql_error()); mysql_query($data2,$connect) or die ("An error has occurred while attempting to create your Pokémon information. Please email darkness55@msn or tpmrpg@aol.com with this information: " . mysql_error()); I don't see anything wrong with it... or is it too much information to insert? Thanks! Quote Link to comment Share on other sites More sharing options...
Yesideez Posted July 11, 2007 Share Posted July 11, 2007 Are they both failing or just one of them? Quote Link to comment Share on other sites More sharing options...
Cless Posted July 11, 2007 Author Share Posted July 11, 2007 The first one is succeeding successfully, however, the second one will not insert. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted July 11, 2007 Share Posted July 11, 2007 On the second query you're trying to put 25 values into 24 fields. This is the extra line: P_ContestNEXP, Quote Link to comment Share on other sites More sharing options...
Cless Posted July 11, 2007 Author Share Posted July 11, 2007 Oh, I didn't notice that. Thanks a lot. You just made my day a thousand times easier. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted July 11, 2007 Share Posted July 11, 2007 You're welcome 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.