Looking at this again, I'm confused here...
why the complicated first part? Are you doing anything more than checking whether B_Calendar is equal to Y ?
How about simply
$query = "
DELETE FROM w3t_Events
WHERE E_Number = '$Number'
";
$dbh -> do_query($query);
no if conditions, no double queries, just delete if you find it... why the rest of the stuff - am I missing something?
Max