public static function get_by_md5($md5) { $type = DigiplayDB::select("type FROM audio WHERE md5 = '" . $md5 . "'"); if ($type) { if ($type == 1) { return Tracks::get_by_md5($md5); } else { if ($type == 2) { return Jingles::get_by_md5($md5); } else { if ($type == 3) { return Adverts::get_by_md5($md5); } else { if ($type == 4) { return Prerecs::get_by_md5($md5); } } } } } }