Jump to content

therehere3

New Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by therehere3

  1. 6 minutes ago, requinix said:

    It'll be a lot more useful if you can track not just whether they've read the thread but whether there have been any new posts since then. Because if I read a thread and someone adds to it later, now I haven't read the thread anymore.

    Grow long? Yes. Grow relatively fast? Yes.
    Be a problem? No. Database systems are designed for this sort of thing, and with good design on your part (especially indexes) a large table won't be any problem at all. At least not for mortals like you and me - grow to Facebook scale and we'll have to revisit this.

    You can also consider a "mark all as read" feature that will help here. You store a timestamp with the user, that applies to either the entire site or to just one subforum, that tracks the last time they hit the "mark all as read". Checking if a thread has been unread or not is a two-step process of checking (1) whether the most recent timestamp for it is after the mark-as-read timestamp then (2) the thread's most recent post is not recorded in the has-previously-read table. Which means that if/when the user hits the button you can also zero-out their records in the read table.

    First, thank you, I really appreciate the reply!

    Second, I like this "mark all read" solution as well. However, if I do go down the right of keep entries of a user id read thread id, would I still want to have a combined index on my DB of userid+threadid even though each insert will require a re-index. But if I don't use that as my index it will be creating a full table search correct? I don't think there is any other way around creating that index for it even though inserts will be slower. Would love to hear your thoughts. 

  2. Hi there! I have created a forums system on my website using PHP and MySQL.

    However, I would like to show a red unread icon showing the user that is logged in that they have not read this thread. 

    The only way I can think of doing this would be to simply create a table with the user id and thread id when they view a thread so if it is not in this table, then simply show the red icon.

    However.... I see this being a problem since this table would grow INCREDIBLY long and INCREDIBLY fast.

    There has to be a better solution right? Any advice would help, thanks! :) 

  3. Glad to see you guys might help:)

    Well the idea is to register an account(user & pass) then store an email with that and have them say where they are located for example: Sacramento, CA. Now I would also want a feature to search everyone and if they are i the same area (Sacramento) then to give a list of usernames and their emails to show up.

  4. Hello there community!:)

     

    I am wanting to make a login system where users can create accounts and put basic information into their own personal account and login and such. If someone can make this happen for me and make it secure login (not easily hackable) then I will pay. Please offer a price for your login system you can put on my website.

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