帝国cms 联合多张表查询

$api->query("select * from ((select * from {$dbtbpre}custom_guanzhu) UNION (select * from {$dbtbpre}custom_newsguanzhu)) as a where a.Userid={$member[userid]} order by a.Createtime limit {$numsize},{$Pagesize}"); 

注意的是 必须保证 两个关联表有相同的字段。

posted @ 2021-01-08 17:33  宋先生日记  阅读(299)  评论(0编辑  收藏  举报