Jump to content

Help with logic of my idea..


EchoFool

Recommended Posts

I need some input on how you would approach this idea logically using tables too..

I have a forum... where by users can edit their posts. But i want to store the original version.. then the new version as a separate row. But obviously then i would have post ID clashes as i sort the post's output by ID order.

 

So i need to some how store the edits with the original so staff can see what they are trying to hide if anything, whilst the post remaining in its exact same position as it did originally in terms of the order of the posts in a thread...

 

How would you go about this.. (i don't need code help here) just logic, is the problem. Once i know the logic i will be able to do it.

Link to comment
Share on other sites

Well, from what I understand maybe this would work.

 

In the new table you have a column for unique ID to the table, another column for the ID of the forum post, and then whatever else for the message and other info. Then when you go to look for the edited messages in this new table you can sort them by the unique ID, that way you will know which post was first and second and so on. You can also look for the ID of the original message on the forum and get the specific edits for that one, sorted by their unique ID.

 

So, a user posts, lets say it's post # 50. They go ahead and edit it, what would happen is in your new database it gets this info: Unique ID = 1, Forum ID = 50, Message = original message. When they go ahead and edit their post again it gets another entry. Unique ID = 2, Forum ID = 50, Message = ... and so on. That would be one way to keep the posts in order.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.