I never use array notation, as it's limited to what it can do. This is an example, you can add multiple WHERE clauses, but only in an AND, not in an OR.
Doesn't work, since the resulting query try to find an flags.id where whis is 2 and 1. If i change to or, It's also wrong, since the where should be done for the join-tabe food_has_foodflags and not for the flags table.