In order to insert some data to mysql I use:
$sql = "INSERT INTO MyGuests (fullname, email) VALUES ('John Doe', 'john@example.com')";
But I'd like, before that, if the fullname John Doe
for example is already used in a query of MyGuests table then that to be updated with the e-mail. If not, then data to be inserted normally like above. How could I do that? Thanks a lot