[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Forum maken met PHP en MySQL
Pagina 1 van 1

Forum maken met PHP en MySQL

BerichtGeplaatst: 13 okt 2008 16:16
door Stefan
Ik ben nu al een tijdje bezig met maken van een forum, alleen nu vraag ik jullie of mijn databasestructuur goed is, en of ik er eventueel wat aan kan veranderen.

tabel forum:
forum_id int(11)
permission_id int(11)
role_id int(11)
categorie_id int(11)

tabel forum_categories
categorie_id int(11)
categorie_name varchar(255)
categorie_descr varchar(255)
categorie_sub int(11)
categorie_color char(10)
categorie_order int(11)
categorie_closed (1)

tabel forum_permissions
permission_id int(11)
permission_read enum('0', '1')
permission_add enum('0', '1')
permission_edit enum('0', '1')
permission_del enum('0', '1')
permission_close enum('0', '1')
permission_replace enum('0', '1')

tabel forum_topics
topic_id int(11)
topic_title varchar(50)
topic_content longtext
topic_status (1)
topic_type tinyint(1)
topic_datetime datetime
topic_ipaddr varchar(40)
topic_edit_datetime datetime
topic_edit_ipaddr varchar(40)
categorie_id int(11)
user_id int(11)

tabel forum_roles
role_id int(11)
role_name varchar(255)

tabel forum_replies
reply_id int(11)
reply_content longtext
reply_datetime datetime
reply_edit_datetime datetime
reply_ipaddr varchar(40)
reply_edit_ipaddr varchar(40)
topic_id int(11)
user_id int(11)

tabel users
user_id int(11)
user_name varchar (40)
role_id int(11)

Het forum wat ik tot nu toe werkt helemaal, alleen de reacties moet ik nog inbouwen. De permissies per rol per gebruiker werken prima! Kolommen met dezelfde naam zijn in de code met elkaar gelinkt.

Laat even wat van jullie horen, wat eventueel anders kan of misschien omdat het jusit wel goed is!

Re: Forum maken met PHP en MySQL

BerichtGeplaatst: 13 okt 2008 16:59
door Derk
doe je de topics nu in een Category (volgens mij schrijf jij dat fout) of doe je die in een topic?

Edit:
Ik zie dat je in je topic ook gelijk je eerste post opslaat? Dat is een beetje dubbel op. Je kunt beter de eerste post van je topic ook als post opslaan :)

Edit2:
ik heb ff een erd gemaakt met wat dingen die ik anders zou doen. Maar dat post ik nadat ik naar de winkel ben geweest...

Re: Forum maken met PHP en MySQL

BerichtGeplaatst: 13 okt 2008 17:23
door Stefan

Re: Forum maken met PHP en MySQL

BerichtGeplaatst: 13 okt 2008 17:46
door Derk
http://zooimap.vedelaar.nl/ERD_nu.jpg
Dit is wat je nu hebt gepost.
http://zooimap.vedelaar.nl/ERD_edit.png
Zo zou ik het doen.
#1, die relatie, als je kijkt naar webmasterplein. Support is een category, en daarin zitten 3 forums. "HTML, CSS, Javascript", "PHP, ASP, SQL" en "Graphics". In een forum zit dan dus een topic, niet in een category.

#2, Als je de eerste post, in de forum_reply's zet, heb je de velden in Forum_topics niet nodig. Forum_posts zou daarom in dit geval ook een beter naam zijn voor de reply's tabel.
Ovirgens denk ik dat dit ook een beetje smaak is. Maargoed, als we naar je code gaan kijken, zo hoef je geen 2 edit pagina's te maken (alleen voor het topic title mischien).

#3, ik snap niet waar deze tabel voor is. Gelinkt aan een gebruiker en een forum?


Leuk dat je het post ovirgens, vind het altijd leuk te discussieren over databases :)

Re: Forum maken met PHP en MySQL

BerichtGeplaatst: 13 okt 2008 17:52
door libia

Re: Forum maken met PHP en MySQL

BerichtGeplaatst: 13 okt 2008 18:12
door Stefan