Results 1 to 9 of 9
Dec 19, 2006, 18:06 #1
- Join Date
- Nov 2006
- 0 Post(s)
- 0 Thread(s)
php /mysql custom coded forum help needed
I am trying to put together my own forum.
I have a MySQL table called "posts". it has a field called "post_thread_id". Now, if I didn't want to create a separate threads table, how could I set it so that when a new thread is created, "post_thread_id" is set to auto_increment, but when it is a reply to an existing thread, it would use $_GET to grab the current thread_id? I don't think PHP can modify MySQL table attributes on the fly, and I don't know how to use PHP to generate a consistent stream of auto_increment numbers.
$thread_id = $_GET['thread_id'];
$thread_id = auto_increment;
I'm doing this for the learning experience. I mean, I wanted to see how hard it would be to code a forum.