Jump to content

[SOLVED] MySQL Insert...


Cless

Recommended Posts

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.