I find ccallid = 4 and it has primaryoldcall = 3 and secondaryoldcall = 2.. and then update isdone = 1 for ccallid = primaryoldcall and ccallid = secondaryoldcalle

hehe now we're both doing it

UPDATE ev_callcontroll SET isdone = 1 WHERE (ccallid,ccallid) IN(SELECT * FROM (SELECT primaryoldcall,secondaryoldcall FROM ev_callcontrol WHERE ccallid = <youroriginalnumberhere>) AS temp); (If you want to set isdone = 1 on the original row as well, add "OR ccallid = <youroriginalnumberhere>" on the end of the query)

'delete' meaning UPDATE row 4 to be blank in primaryoldcall and secondaryoldcall, or DELETE the primaryoldcall and secondaryoldcall rows?

Deleting the rows seems like a bad idea, but...DELETE FROM ev_callcontroll WHERE (ccallid,ccallid) IN(SELECT * FROM (SELECT primaryoldcall,secondaryoldcall FROM ev_callcontrol WHERE ccallid = <youroriginalnumberhere>) AS temp);

no, first check ccallid .. then check if it has primaryoldcall or secondaryoldcall .. then compare with another ccallid that have the same value as primaryoldcall or secondaryoldcallin this case..I find ccallid = 4 and it has primaryoldcall = 3 and secondaryoldcall = 2.. and then delete ccallid = primaryoldcall and ccallid = secondaryoldcall

update ev_callcontrol set isdone =1 where ccallid in (select ccallid from (select * from ev_callcontrol where ccallid in (select primaryoldcall from ev_callcontrol where ccallid = 4) or ccallid in (select secondaryoldcall from ev_callcontrol where ccallid=4) or ccallid=4) as t1)