I'm currently having problems with a gaming ladder script and specifically the register/validate part.
A player will register and will have to validate via a code sent in e-mail. The username etc. are stored in the table 'validate'. Once validated the username etc. should be transferred to the 'users' table but this doesn't happen.
The data is deleted from the 'validate' table but doesn't appear in 'users'
That's why you are "losing" data. There is a missing (or extra) column in one of your SQL statements, causing the statement to fail.
Look over your SQL and make sure that you have the right number of columns in your INSERT.
FOR EXAMPLE:
If mytable has 13 columns, INSERT INTO myTable VALUES () needs to have 13 values in it, while INSERT INTO myTable (col1,col2,col3) VALUES () only needs to have 3 values in it.
__________________
Quote:
To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
Please, if you found my post helpful, pay it forward. Go and help someone else today.
That's why you are "losing" data. There is a missing (or extra) column in one of your SQL statements, causing the statement to fail.
Look over your SQL and make sure that you have the right number of columns in your INSERT.
FOR EXAMPLE:
If mytable has 13 columns, INSERT INTO myTable VALUES () needs to have 13 values in it, while INSERT INTO myTable (col1,col2,col3) VALUES () only needs to have 3 values in it.
Cheers. I didn't code the script myself.
I added extra ones in make them equal but still get the same error.
1. I'm guessing the coder put NULL in first as that would be the 'ID' column and is auto_increment. Would I be right?
2. The last two fields are showing the attributes 'UNSIGNED'. Would this make a difference at all?
I recently integrated the ladder with a forum so this is where the extra fields came from.
EDIT: Okie. Not having a good day. I was saving the file but then uploading the original one again. Did it 4 times before I reliased. It's now working. Thanks for the help! Rep given.