Home  >  Article  >  Backend Development  >  Is there any way to display only 5 pieces of data in each group by group by?

Is there any way to display only 5 pieces of data in each group by group by?

WBOY
WBOYOriginal
2016-10-22 00:14:271648browse

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.
Is there any way to display only 5 pieces of data in each group by group by?
I want to use group by to limit the output quantity of each group, but it seems that it cannot be realized.
Is there any way to display only 5 pieces of data in each group by group by?
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?

Reply content:

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.
Is there any way to display only 5 pieces of data in each group by group by?
I want to use group by to limit the output quantity of each group, but it seems that it cannot be realized.
Is there any way to display only 5 pieces of data in each group by group by?
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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn