matt2kjones
11-30-2002, 01:46 PM
hi i making a forum and have got a problem with something
This is what happens
when a topic is made, a post is also made. Now, the topic_id in the forum_topics table has got an auto_increment number
so that goes up on its own
and so has the post_id of the post in the forum_posts table
now i have a problem
when a user creates a topic, the topic is given a topic_id, and a post is also made, the post is given an automatic post_id
now here is the problem
to tell where the post belongs i have to store the topic_id in the table where the post is stored
but if two people create topics at the same time then the post may go to the wrong topic, as the wrong topic_id may go into the forum_posts table
how could i get around this???
any ideas?
thanx
This is what happens
when a topic is made, a post is also made. Now, the topic_id in the forum_topics table has got an auto_increment number
so that goes up on its own
and so has the post_id of the post in the forum_posts table
now i have a problem
when a user creates a topic, the topic is given a topic_id, and a post is also made, the post is given an automatic post_id
now here is the problem
to tell where the post belongs i have to store the topic_id in the table where the post is stored
but if two people create topics at the same time then the post may go to the wrong topic, as the wrong topic_id may go into the forum_posts table
how could i get around this???
any ideas?
thanx
