What brand filter? It's surprising that your hose came off, if pushed over two or more barbs of a barbed fitting.
Tape is a poor choice if you really want to have assurance that a hose will stay on. As Tanen suggest, hose clamps are the absolute best, and zip ties will be better than tape.
Eheim Pimp #459 - 2213, 2234
SunSun Pimp #47 - (Perfect) HW302