Home >Backend Development >PHP Tutorial >Is there any way to display only 5 pieces of data in each group by group by?
Dear masters, I am a newbie. I want to realize that clicking on all articles will bring up 4 boxes, and each box is limited to output 5 pieces of data.
I want to use group by to limit the output quantity of each group, but it seems that it cannot be realized.
html outputs the main title and secondary title. I have a judgment that it will only be output if the parent of the secondary title is equal to the main title, so the offset of volist cannot be used. It limits the total amount, but after the if I can’t set it up, what should I do?
Dear masters, I am a newbie. I want to realize that clicking on all articles will bring up 4 boxes, and each box is limited to output 5 pieces of data.
I want to use group by to limit the output quantity of each group, but it seems that it cannot be realized.
html outputs the main title and secondary title. I have a judgment that it will only be output if the parent of the secondary title is equal to the main title, so the offset of volist cannot be used. It limits the total amount, but after the if I can’t set it up, what should I do?
I think your problem is a mysql query problem, not a php problem.
mysql grouping takes the first N records of each group