Announcement

Collapse
No announcement yet.

How does forum software store threads?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does forum software store threads?

    I know this is a stupid question but I am coding a CMS (I am new to databases) for my site and I need to enable mutiple staff members to post summaries of the pokemon episodes (this is independent from vB) when I plan to only have 1 page per an episode. How would I do that? I just need a basic idea of how threads generally work.

    Also if anyone could explain to me how to get PHP to detect if there is data in a row from a MySQL query or not, it would be a big help.
    Last edited by ShiningArcanine; Wed 22 Oct '03, 12:32pm.

  • #2
    Well for the threaded way, when you add a new rom to the table, you would have the row_id, parient_id, and if you add a first row, the row_id would be 1, and parient_id be 0, then add a reply to that thread the row_id would be 2, parient_id 1, add a new thread, you would have row_id 3, parient 0, another to the first, row_id 4, parient 1.

    Complex, someone else maybe able to give a better explaination, but its one of thoes things you need to sit down and think about.

    mysql_affected_rows() returns how many rows were returned, check the php manual for how to use it.

    Comment


    • #3
      If you don't understand the basics of PHP and vBulletin integration, you are better off downloading and using a pre coded portal. If you are running vB3, take a look at external.php in the root directory. If you are running vB2, take a look at Pluh News script. Both provide ways to extract data from MySQL in vB MySQL schema.
      Trent Gillespie Mod Theater Gillespie Photography

      Comment


      • #4
        I'll actually take the opposite stance and say that I think you should try yourself. If you have trouble and *need* something you can't yourself manage, then go for an existing solution.

        I'd say you can learn from whatever product you choose to use, but I can't say the quality of the code will necessarily be very good.

        Comment


        • #5
          I have already started coding my own. I am coding the DB and inserted some test data so I can code the display files first. I seem to have been doing categories wrong. Also, my method to do the threading was the wrong way.

          Thanks guys. I will come back here if I have any trouble.

          Btw, I am intermediate at PHP and new to MySQL. I haven't really looked through the vB source code since I figured it is hundreds of times more complex than anything I have ever coded so I figured I should ask you guys instead of trying to dechiper it.
          Last edited by ShiningArcanine; Wed 22 Oct '03, 4:46pm.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X