UPDATE or INSERT
Posted: Wed Feb 11, 2009 12:52 pm
How do I know whether to update my database of insert a new row?
If someone logs into my site I want to check to see if they already exist in my database if they exist I want to update the user's info and if not I want to insert new user info.
Is this just a simple "if else" in PHP or are there MySQL methods to take care of this kind of thing?
Thanks
If someone logs into my site I want to check to see if they already exist in my database if they exist I want to update the user's info and if not I want to insert new user info.
Is this just a simple "if else" in PHP or are there MySQL methods to take care of this kind of thing?
Thanks