I have a database, with 5 tables, one of them is named players
Inside of players I need to find out if a character_name is already used.
Does anyone know off the top fo their head the SQL command to do this?
Thanks
Simple MYSQL command
Moderator: General Moderators
-
whiterainbow
- Forum Newbie
- Posts: 11
- Joined: Fri Mar 18, 2011 9:13 am
Re: Simple MYSQL command
you'd have to do something like SELECT character_name FROM players WHERE character_name = '$variable' , where variable is the value you're comparing to. If your query returns a row, that name is used.