Sometimes my users create two accounts and so I have a query that goes into the searches table and attempts join the searches from both of their accounts into one:
UPDATE searches SET author = '$newAuthor' where author = '$oldAuthor'
On my website form I simply type in the userID that I want the old searches to be reassigned to. This works fine if the keyword column doesn't contain the same search words for each account. How would I restructure my query so that it will only change the author of the search IF it doesn't already exist? Does this make sense?