关于多表的分页

浏览:2758 发布日期:2013/08/20 分类:求助交流
行文一下,下面的同时查是个表的SQL语句,如何调用系统的分页列子?
$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();
最佳答案
评论( 相关
后面还有条评论,点击查看>>