dongsuyou6938 2013-09-24 01:36
浏览 20
已采纳

问答论坛 - 逻辑[关闭]

I'm not asking for help with coding I'm just asking for somebody to help me come up with an idea of how I would make it.

Basically I want to make a basic Q&A forum, I guess you could say its like Stackoverflow, but not nearly as advanced its just something quick to add onto my website.

I was thinking of just making a default form you fill out to post what you want then it'll just save the POST of all the data into a table in a database and it'll give it an auto_incremented ID. The only thing I can't think of is how I would display all of them on the homepage, make it so it only displays a maximum of 15 posts and then make different pages like Page1,2,3,etc...

Should I check the table for how many rows there are and then save that amount as a variable then make it post them in order from what ID they have? I'm not sure what I could do for comments and everything but I would love your guys help with figuring this out!

As I said this isn't really much about the coding, its more about figuring out the logic behind how I would make it.

  • 写回答

1条回答 默认 最新

  • dqpdb82600 2013-09-24 01:40
    关注

    What your asking about is termed pagination here's a php tutorial

    http://net.tutsplus.com/tutorials/php/how-to-paginate-data-with-php/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算