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
https://forums.phpfreaks.com/topic/75756-small-custom-bbs-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.