I have an array:
$codes = array (97121, 97122, 97123, 97180);
The real array is much longer, it contains nearly 130 codes so I think it doesn't have to be a loop.
And I have a mySQL table that has a column VilleAnn
(city with postal code) ex:
- Sainte-Anne 97180
- Sanary-sur-Mer 83110
Using mysqli I have to select where VilleAnn
doesn't contain any postal code from the array $codes
.
If the VilleAnn
is a simple postal code I would say:
SELECT * FROM table WHERE VilleAnn NOT IN(97121, 97122, 97123, 97180)
But in this case it must be something using NOT LIKE "%..."
Any suggestions?