1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | item表: id name pdate 1 # 1 2 bbb 1 3 ccc 2 4 ddd 1 wplan表: id fid cap week 1 3 a111 16 2 2 a222 16 3 3 a333 17 4 2 a444 17 ================ 合并结果表: name pdate cap week # 1 bbb 1 a444 17 ddd 1 =============== 合并表条件: 1. item表:pdate=1全部显示 2. wplan表:week=17,fid=item表id |