doupo2241 2011-01-10 16:36
浏览 111
已采纳

PHP>按名称对查询结果进行排序,同时让每个字母都在顶部

I'm currently working on a site that will display a list of online shops, Each shop will be stored on my database and I'll be using PHP to select and display them.

But since those shops will pay me, I want to let each shop to be on the top of the list sometimes, (for example if the shop name starts with a "Z", they will probably complain for being on the bottom of the list all the time, so I want to keep it fair).

So I thought about letting each letter be on the top of the list for an hour, but i have no idea how to do that.. Is that even possible?

Thanks in advance!

  • 写回答

4条回答 默认 最新

  • dongxiezhuo8852 2011-01-10 16:56
    关注

    I'd show a separate box and call it "today's pick" or something with just one shop in it. That way you can push the shops starting with "Z" to the top once in a while and at the same time keep the user experience of a list of shops which is sorted normally.

    Then use the database to save which shop has been in the "today's pick"-box how many times to get them all up there equally.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题