普通网友 2014-08-19 12:42
浏览 36

如何对Facebook评论系统的帖子进行排序

I am sure most of you would of used Facebook or know how to use it at some point now I am creating a group feature similar to the one Facebook has implemented on there site but with my own unique features.

The only big issue I have been having and users have requested to do this so I need to make my users happy is sort the posts like Facebook does so the newest comment gets display down the bottom of the posts and the oldest comments get's display right up the top I have tried these but they have no effect I am coding this software for the Mybb forum system/software.

[Not sure why stackoverflow didnt put a code block around this so you all know no big deal] $db->query("SELECT * FROM " . TABLE_PREFIX. "groups_comments WHERE post_id='$something' ORDER BY post_id DESC");

I even replaced desc with asc and tried to sort it different ways.

how would I be able to sort it like Facebook so I can make the feature easier to find comments and to use

Thanks!

Note: There's really no code to see as this is a how to feature as I have not written anything decent but I have tried before asking.

I be great full as I have been searching for days without luck [maybe not searching the right term]

  • 写回答

2条回答 默认 最新

  • doujia2463 2014-08-19 12:47
    关注

    It seems an error free Query, I insist you once again to check your query by triming the white space before the " TABLE_PREFIX"... ty.

    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?