Codes here !
4 posts • Page 1 of 1
- New php-forum User
- Posts: 164
- Joined: Tue Aug 27, 2002 8:25 pm
- Location: Ontario, Canada
I made a script that will add new users to my db but I first want it to check the entire column to see if the username exists. Is there any specific function that would be good or should I just make a loop to go through each row?
select count(*) from usersTable where username='$user'
I wouldn't use the address as a way of checking the data, since addresses can be miss-spelled etc. It would have to be exactly right for a match to occur. Better to pick one thing that won't change (like an email address) and use that to search for a matching record