Here's another method that would probably be easier. Actually two, depending what you want to do. Not to say yours can't be done, this just saves else statements and lookups towards the end.
First way: If you don't need to keep track of what's being updated.
$counter = 0;
if(first_check) {
$sql .= ' blah blah blah';
$counter++;
}
if(second_check) {
$sql .= ' blah blah blah';
$counter++;
}
if(third_check) {
$sql .= ' blah blah blah';
$counter++;
}
# Now check the count
if($count == 0) {
// no updates were done
}
Now if you did need to keep track, change it up to an array.
$check = array();
if(first_check) {
$sql .= ' blah blah blah';
$check[] = 'first_check';
}
if(second_check) {
$sql .= ' blah blah blah';
$check[] = 'second_check';
}
if(third_check) {
$sql .= ' blah blah blah';
$check[] = 'third_check';
}
# Now do the count
if(count($check) == 0) {
// no updates were done
}
else {
// echo what updates were done
}