Hi!
I'm trying to build discussion forum with php and I have following problems:
I' m using mysql database to store messages,ids etc. informations. The problem
is when I try to query written messages and replied messages. Sometimes replied messages appears in wrong message chain (browser output). Is there anyone
who has done similar code? I'm interested how to sort queried data and how to do that sorting process. My sql structure for messages is following:
time varchar(25) default NULL,
areaid varchar(10) default NULL,
areaname varchar(100) default NULL,
messageid varchar(255) default NULL,
userid varchar(255) default NULL,
subject varchar(255) default NULL,
name varchar(255) default NULL,
email varchar(255) default NULL,
read_times varchar(20) default NULL,
is_reply varchar(5) default NULL,
reply_id varchar(255) default NULL,
timestamp timestamp(14) NOT NULL,
message longtext
There is couple of entries which are not used but exists for future use.
The messageid is generated randomly and that replyid is saved only if message
is reply for message and replyid is messageid of original message.
This may not be the best way to do discussion forum , but I'm still learning
php =)
But if you have any suggestions please reply for me!
Regards
Markus Hakonen