帝国cms一句MySQL语句实现多表数据之和

COS、CDN
wdzsjl 2周前 (01-01) 阅读数 21 #工具收纳箱
  • SQL语句:
    SELECT COUNT(AA.id) AS total FROM (   SELECT id FROM www_moban5_cn_ecms_news   UNION ALL   SELECT id FROM www_moban5_cn_ecms_xiazai   UNION ALL   SELECT id FROM www_moban5_cn_ecms_photo   UNION ALL   SELECT id FROM www_moban5_cn_ecms_download ) AA;
  • 在帝国CMS后台使用:
    SELECT COUNT(AA.id) AS total FROM (   SELECT id FROM phome_ecms_news   UNION ALL   SELECT id FROM phome_ecms_xiazai   UNION ALL   SELECT id FROM phome_ecms_photo   UNION ALL   SELECT id FROM phome_ecms_download ) AA;

以上是针对帝国CMS的一些常见问题及其解决方案,希望对你有所帮助。如果有更多问题,欢迎继续提问。

COS、CDN
热门