select vinfo.vid_id, vid_name, vid_leadrole, vid_desc, vid_director, vid_date, vid_area, vid_pic, vid_score, vid_info, vinfo.cid, vid_serialstate
from (tb_videoinfo vinfo ,tb_category cg ) where vinfo.cid = tb_category.cid and cg.cid=#{cid}
MySQL5.0 Bug, 要把联合的表用括号包含起来才行: