
January 19th, 2003, 09:09 PM
|
|
Contributing User
|
|
Join Date: Aug 2002
Posts: 67
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
Linking tables?
Can someone help me I am trying to make a forum but I am having dificulaty thinking of how to make the tables for the forums.
Here is what I have.
PHP Code:
$sql = "CREATE TABLE forum (
forum_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
forum_name_id INT NOT NULL
);";
$sql = "CREATE TABLE forum_name (
forum_name_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
forum_name TEXT NOT NULL,
sub_forum_id INT NOT NULL,
FULLTEXT (forum_name)
);";
$sql = "CREATE TABLE sub_forum_id (
sub_forum_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
post_id INT NOT NULL
);";
$sql = "CREATE TABLE Post (
post_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
post_title TEXT NOT NULL ,
post_date DATE NOT NULL ,
post_story TEXT NOT NULL ,
post_icon TEXT NOT NULL ,
post_member TEXT NOT NULL ,
FULLTEXT (post_title, post_story, post_icon, post_member)
)";
Hopefully you can see in their how I want the tables to link to eachother and all of them update...I am using PHP as you can tell...Can someone please push me in the correct direction?
__________________
Thanks,
Attila
http://www.glorynaspiration.com
http://www.abitofthings.com
|