Mysql 查询多条语句 添加数字自增从1-N
select a.*,(@i := @i + 1) as ord_num from t_punch_cade a,(select @i := 0) b order by user_id,punch_time;
Dcr163的博客
http://dcr163.cn/161.html(转载时请注明本文出处及文章链接)
select a.*,(@i := @i + 1) as ord_num from t_punch_cade a,(select @i := 0) b order by user_id,punch_time;
Dcr163的博客
http://dcr163.cn/161.html(转载时请注明本文出处及文章链接)