Il foreach scorre l'array uno ad uno e quindi con id-1 ti pesca fuori id-2 e con id-2 tira fuori id-1

potresti fare una variabile multivalore del tipo:
codice:
$test = '1, 2, 3';

$query = mysql_query("SELECT id, nome 
                      FROM $db_table1 
                      where id NOT IN($test)
                      order by nome");