Using the results of a SELECT to perform an UPDATE
I read in the mySQL manual, "Currently, you cannot update a table and select from the same table in a subquery." So what is the best way to take the user IDs from this first query...
...and then turn right around and update the campaigns table with this
WHERE sponsorID = 717
and memberType = 'No'
and uID in (select uID from campaigns where type = 'Enrollment' and answer in ('Contact', 'Purchase')
and status = 'Undiscovered');
update campaigns set status = 'Discovered' where uID in (the uIDs from the result of the first query)