set @scriptureId=43;
set @_userId=1;

select  scripture_id,scripture_name,0 all_word_count,0 word_no,0 all_word_no, 'jwmc' type  from zt_scripture where scripture_id = @scriptureId and is_enabled=1
         union
         select  scripture_id,null scripture_name,count(rep_id) all_word_count,0 word_no, 0 all_word_no,'zzs' type  from zt_repentance where scripture_id = @scriptureId and is_enabled=1
         union
         select  scripture_id,null scripture_name,0 all_word_count,count(rep_id) word_no,0 all_word_no,'zhzs' type  from zt_repentance where scripture_id = @scriptureId and is_enabled=1
         union
         select  scripture_id,null scripture_name,0 all_word_count,word_no,all_word_no,'curposition' type from zt_curposition where login_id=@_userId and scripture_id = @scriptureId and is_enabled=1 ;
文档更新时间: 2023-05-17 06:39   作者:admin