24.05.2014, 01:50
Quote:
All these replies are useless (except maybe Mark's). He's asking how to write a SQL query for what he is trying to achieve. He explicitly said, "I already have the other stuff sorted out, to get the username from where it's typed in the box".
Anyway, as I understand it, you have a form that allows you to set a specific player's badge number. I'm not sure what the table name and column names are but this should point you in the right direction. Код:
UPDATE users SET badge='12345' WHERE user_id=42 |
So it sets whatever is put in the Badge part to the username that is entered above. I can also change it from username to User ID as the way the login system works every registered user has an ID.