查询1:
Select null as name,Checkinout.* from Checkinout where (Checkinout.userid=1000000000000 and (Checkinout.CheckTime >='2008-01-01 00:00:00') and (Checkinout.CheckTime <='2020-01-01 23:59:59')) Order By Checkinout.CheckTime DESC Limit '0','6'
查询2:
Select UserInfo.name,Checkinout.* from UserInfo left join Checkinout on Checkinout.userid=UserInfo.userid where ((Checkinout.CheckTime >='2008-01-01 00:00:00') and (Checkinout.CheckTime <='2020-01-01 23:59:59')) Order By Checkinout.CheckTime DESC Limit '0','6'
将这两次查询的结果合并后按照Checkinout.CheckTime排序