Jump to content

[SOLVED] Best method ?


unsider

Recommended Posts

This isn't directly code related, but it is a PHP question, if not, feel free to moce to appropriate question.

 

I am trying to design a comment system, but have the ability to retrieve/determine the following:

count the #, comments (42)

the ability to edit/delete

check the existence of comments

 

While not complex, it is absolutely necessary.

 

Should I use a DB do this? Or Not.

 

My only concern with DB is that each article will most likely have dozens of comments and that adds up, and even time a query has to retrieve the comments for that particular article, and the output could become slow.

 

I've never allowed the existence of comments on my sites, so I'm kind of new to this. Sorry for my ignorance.

 

If there is another method, or other ideas to make that possible as effeciently as possible, please let me know.

Link to comment
https://forums.phpfreaks.com/topic/113399-solved-best-method/
Share on other sites

Of course you'd use a database.  Also, the page will not be slower with your "dozens of comments".  Just look at forums.  They aren't slow and think of all the stuff that it has to do!  You'd have a separate comments table which would be associated with each article by a unique article_id.

Link to comment
https://forums.phpfreaks.com/topic/113399-solved-best-method/#findComment-582641
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.