I have table:
id, day, user, value, active
And now i get
SELECT day from ppl GROUP BY user
but! i want to get all days in one row, not only one
for example
day: 1,2,3,4,5,6,7,8,9...
user: myusername
is it possible?
Yep,
SELECT
user,
GROUP_CONCAT(day) day
FROM ppl
GROUP BY 1;
Is answer for my question, but i've got next, last
Here is result of query
http://screenshooter.net/0562655/24_05_2012__22_37_09
how to change
row 3 from 8,9,10 to 8-10
row 5 from 21,22,23,24,28,29,30 to 21-24,28-30
row 6 from 17,21,22,23,24,25 to 17,21-25
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…