select @row_num totalcount,1 as pageIndex, 3 as pageSize,result_order.*
from account_report as ar inner join (
select @row_num:=@row_num+1 AS row_num ,a.name as aName,a.transaction_type,r.report_date,r.name as rName,r.submit_time,r.deadline,r.`status`,r.id as reportId
from account a,account_report r ,(SELECT @row_num:=0) AS rowvar
where r.account_id=a.id and a.transaction_type in (2) and r.`status` in (0) and r.`type` in (0)
)
AS result_order on ar.id=result_order.reportId

and result_order.row_num>(3*(1-1)) and result_order.row_num<=(3*1)
order by result_order

 

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
猜你喜欢
  • 2022-02-03
  • 2021-08-27
  • 2021-08-19
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案