我想实现的是
select * from A where id in (1,2,3) limit 5;
现在查询的是 id符合1 2 3 的条件 一共返回5条
但是我想实现的是 id符合1 2 3 的条件 每一个符合条件的数据 各返回5条,一共是15条.
求解 求大神mysqlinlimitphp
select * from A where id in (1,2,3) limit 5;
现在查询的是 id符合1 2 3 的条件 一共返回5条
但是我想实现的是 id符合1 2 3 的条件 每一个符合条件的数据 各返回5条,一共是15条.
求解 求大神mysqlinlimitphp
union all
select * from A where id=2 limit 5
union all
select * from A where id=3 limit 5;
SELECT * FROM ttha a WHERE 5>(select COUNT(*) FROM ttha WHERE
a.id=id AND a.id1>id1) and a.id in (1,2,3)
[征集]分组取最大N条记录方法征集,及散分....
select COUNT(*) FROM ttha WHERE
a.id=id AND a.id1>id1
为什么需要自增呢 嘛意思。。
WWWWA 已经解决! 谢谢您