I have two result sets:
$array1 = (0=>'name1',1=>'name2');
$array2 = (0=>'name',1=>'name1',2=>'name2',3=>'name4');
select * where not in(select ....)
For a SQL select
which has multiple fields for the key, you can use the following syntax...
SELECT *
FROM CompletedTasks
WHERE (userID, taskID) NOT IN
( SELECT userID, taskID
FROM PlannedTasks
) ;