This is a very amateur question (don’t rate me down for it) but how would I create a column
for comments
containing the id of the post they are assigned to?
For example if I was to post a comment on post #48, how would I set that up in MySQL so the
comment shows up on post #48 and not all of the posts?
Thanks in advance:)
Its a one to many relationship (one post can have many comments) so you’ll be wanting a new table for it.
And if you want to be able to flag and moderate comments you may wish to include something such as:
Your SQL then to display comments for a post would be like
To add a comment to the database: