It it possible to optimise this at all? It works fine but isn't as tidy as it could possibly be.
TIA
function changeManufacturerState($manufacturerIDs, $state) {
$query = "UPDATE MANUFACTURER set STATE=$state where ";
$firstLoop = true;
foreach ($manufacturerIDs as $value) {
if ($firstLoop == false) {
$query .= " OR ";
}
$query .= "manufacturerId=$value";
$firstLoop = false;
}
}