开发者

What's the general idea on displaying 'what's new' message to user using PHP and MySQL?

Just like Twitter's pattern, one user can follow another, and the others' news containing new tweets, new photos and something like that will display on this user's homepage in time order.

I don't have any idea on this. One may follow thousands of other users, if i use开发者_如何学Python 'select' to do this, there would be too much select query to do.

If anyone please tell me a general idea on this?


Then you use TOP or LIMIT in your query to limit the amount of returned results. You could implement paging with, say, 50 messages per page, so each query will only return 50 messages.


u can keep track of ur records with an additional columns to status and datetime. That way you can post the latest status and datetime. Note you must write code to change the status according to entries, meaning u must change the status of a previous record whenever a user addes new record.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜