create view ct_mac
as
SELECT `vod_id`,`vod_name`,`vod_class`,`vod_pic`,`vod_actor`,`vod_director`,`vod_blurb`,`vod_remarks`,`vod_area`,`vod_lang`,`vod_year`,`vod_score`,FROM_UNIXTIME(`vod_time_add`) as `vod_add_time`,`vod_play_url` FROM `ct_vod`
union
SELECT `vod_id`,`vod_name`,`vod_class`,`vod_pic`,`vod_actor`,`vod_director`,`vod_blurb`,`vod_remarks`,`vod_area`,`vod_lang`,`vod_year`,`vod_score`,FROM_UNIXTIME(`vod_time_add`) as `vod_add_time`,`vod_play_url` FROM `vd_vod`
ct_mac------------是视图名称
ct_vod-------
}是两个合并的表
vd_vod-----
调用的时候当作普通表用就可以了
比如
SELECT
*
FROM `ct_mac`