SELECT SQL_CALC_FOUND_ROWS t3.id, a,bunch,of,other,stuff FROM t1, t2, t3 WHERE(associate t1,t2,and t3 with each other) GROUPBY t3.id LIMIT 10,20SELECT FOUND_ROWS() as count;
使用以上两个语句即可完成满足group by的总记录行数。
补充:
group by 的简单使用方法:
复制代码 代码如下:
'SELECT column_id,count(*) as count FROM my_table group by column_id';