How do I know if the record is new?

admin

Administrator
Staff member
I'm sure there has to be a very easy way to do this, but I can't figure it out...

If I have a value, how can I figure out if that value exists in the database without cycling through each and every value and testing each one?

For instance, when a user comes in and wants to add their username and password to the database, how to I check to make sure that the username they want to use is unique?

I'm assuming that there is a very easy mysql query that would handle this....
 
Back
Top