How to SELECT the newest four items per category?

前端 未结 8 2266
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 01:43

I have a database of items. Each item is categorized with a category ID from a category table. I am trying to create a page that lists every category, and underneath each

8条回答
  •  误落风尘
    2020-11-22 02:20

    ok after a googling the quick answer would it's not possible at least on mysql

    this this thread for reference

    maybe you should cache the result of that query if you are afraid to make fall down the server and you want the code to perform more well

提交回复
热议问题