Hello.

I am wondering, if there is a way to find an array of numbers NOT in a MYSQL table.

I have found this solution, but i'm after the REVERSE of this process.

Code:
foreach( $array  as $key )  $values= $values . "'" . $key . "', ";

$sql = "SELECT *
 FROM table
 WHERE number NOT IN ( " . rtrim($values, ', ') . " )"
The above example, assumes you have a number in a MYSQL row/value that is NOT in the array.

But, I am wanting the REVERSE, I have an array of numbers, and I am wondering if the same number is in the array but NOT in the MYSQL table.

EG :- $values = array(15, 76, 52, 7, 5);

MYSQL table already contains dozens of numbers in a specific field, but not the numbers 52, or 5.

I want to find the 52, or 5 number (i may even do LIMIT of 1).

Is there a quick method ? Or would i need to select ALL the MYSQL numbers & do a foreach check on each number with the existing array ?

(I expect hundreds of numbers in the array)