vcherubini
Programmer
I think that this is the last thing that I need for a forum that I am making.
I am working on the part where the user can reply to a post. I have a mySQL table that is called replies. I also have a mySQL table called posts. In the post table, I have an id, user, subject, and message field. Each time the user posts a message, the id field is incremented by one, the subject field gets a value, the user field gets a value, and you guessed it, the messages field does as well. Like I said, I have a replies tables. In the replies table, there is an id, user, subject, and reply field. The same happens with the reply table as the post table each time a user submits a reply.
The problem is pretty hard to explain though, so bear with me. Whenever I submit a reply, the id field is incremented by one, so each reply has a new id value. When I click on a link to see the posts and replies, it will only show one reply at a time because it only calls one id. How can I set up my PHP code/mySQL dbase so that if you have two replies for one post, the id field does not increment until you reply to another post. Is this really confusing?
Any and all help is appreciated.
Thanks a lot,
-Vic
vic cherubini
malice365@hotmail.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
Wants to Know: Java, Cold Fusion, Tcl/TK
====
I am working on the part where the user can reply to a post. I have a mySQL table that is called replies. I also have a mySQL table called posts. In the post table, I have an id, user, subject, and message field. Each time the user posts a message, the id field is incremented by one, the subject field gets a value, the user field gets a value, and you guessed it, the messages field does as well. Like I said, I have a replies tables. In the replies table, there is an id, user, subject, and reply field. The same happens with the reply table as the post table each time a user submits a reply.
The problem is pretty hard to explain though, so bear with me. Whenever I submit a reply, the id field is incremented by one, so each reply has a new id value. When I click on a link to see the posts and replies, it will only show one reply at a time because it only calls one id. How can I set up my PHP code/mySQL dbase so that if you have two replies for one post, the id field does not increment until you reply to another post. Is this really confusing?
Any and all help is appreciated.
Thanks a lot,
-Vic
vic cherubini
malice365@hotmail.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
Wants to Know: Java, Cold Fusion, Tcl/TK
====