$arr= $Date->table('pre_forum_attachment_0')
->union('SELECT * FROM pre_forum_attachment_0',true)
->union('SELECT * FROM pre_forum_attachment_1',true)
->union('SELECT * FROM pre_forum_attachment_2',true)
->union('SELECT * FROM pre_forum_attachment_3',true)
->union('SELECT * FROM pre_forum_attachment_4',true)
->union('SELECT * FROM pre_forum_attachment_5',true)
->union('SELECT * FROM pre_forum_attachment_6',true)
->union('SELECT * FROM pre_forum_attachment_7',true)
->union('SELECT * FROM pre_forum_attachment_8',true)
->union('SELECT * FROM pre_forum_attachment_9',true)
->where("aid in(select aid from pre_forum_attachment where tid IN (SELECT tid FROM `pre_forum_thread` WHERE ( fid='36' )))") ->select();
最佳答案
