What's the idea of doing a simple reply system? I don't know what I do.

98 4

I'm a beginner of php, and now you're using only a little bit of knowledge to write a small forum, many of the ideas want to do.

Now my own idea is that:

For example, my site 's address is xxx. Com, and click on a post to get back to the id, from mysql to get the of the post, the url jump to xxx. com/t/? post = id.
And then put a index. Php in the t directory, and make a style, loop out the reply data in mysql.
There's no problem running now.

But I always think there's a problem with my thoughts, not in the forum, the data is generated in real time? no, I don't know what I'm saying.

1 Answers

84 0

General posts and posts are placed in two tables, when they reply.

select from 回帖 where 主帖id=ooxx limit page_size offset page_number;

After considering performance, you can introduce caching and so on.