Jump to content

Small Custom BBS help


wayne0126

Recommended Posts

Hi,

 

Im workin on like a small bbs thing where people can post/reply and add new topics. So far, I pretty much got most of the basic things to work except one thing which is adding new topics. Im not quite sure what to do about that. What I got is two tables in a database which are table_posts and table_topics. Both tables are set to auto increment for their id' fields and I think set them up pretty good. I can do replies to topics easily when someone posts a reply, it goes to the topic easily but adding new topics which adds a new topic and post with it seems to be like updating both tables at the same time. I dont know how to get around that.

 

Like... Person A submits new topic. table_posts has received a new post row with id autoincremented to 3. At the same time table_topics has a new row in it with an id of 2 which receives the id of 3 from the new post on table_posts inserted into its field 'first_post_id'. When this part is done, the row in table_posts with the id of 3 has also its field updated 'topic_id' to 2. This in that now both tables are connected with the correct information.

 

Does that make any sense?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.