Database logic for conversation (like Forum) PHP, MySql -
i want create page possible create topics , users able comment.
i create table discussion recursive relation. don't if idea good.
how can find id of parent when user comment? don't if clear...
below find 3 screenshots explain better situation.
i not have parentid point comment precedes it, that's bad practice around. parentid should point topic , when selecting comments database, make query orders them time or id see order posted in.
for example...
select * `discussion` `parentid` = 1 order `time` desc;
the parentid should null topics , not null (integer) replies (the integer should point id of topic). hope understood asking correctly.
Comments
Post a Comment