check if entry exists before inserting duplicant entry?
Posted: Wed Mar 17, 2004 3:31 pm
Before adding a user to my MySQL database I want to check to make sure they don't exist already. I want to validate their ID, FirstName, and LastName before running the query to insert them into the database.
I can provide any code I'm working with if you want but this seems like a simple IF or maybe even a built-in feature of MySQL(?).
Any suggestions? It'd be nice to turn this into a function too, for later use.
Thanks in advance.
I can provide any code I'm working with if you want but this seems like a simple IF or maybe even a built-in feature of MySQL(?).
Any suggestions? It'd be nice to turn this into a function too, for later use.
Thanks in advance.