分表查询
(select {$fields} from {$table} where {$where}) union all (select {$fields} from {$table} where {$where}) order by {$orderBy} limit {$limit}
分表查询记录总数,count(),sum()
select sum(count) as num from (select count(*) as count from {$table} where {$where} union all select count(*) as count from {$table} where {$where}) as total