Jump to content

Need some help..


TaylorSandbek

Recommended Posts

Building a site/facebook app that is pretty complex (as they say, my eyes were larger then my stomach, so my imagination is larger then my skills) and well, obviously Ive run into some problems.

One of the main features of this is that it notifies you when your friend has requested an event. (wont get into further detail as it is not necessary). But Im lost as to how I would do this. My one solution was store the request for an event in my database, then everytime someone logged on I would check for stored event request. But then How would I determine which requests where replied to/deleted? Would I use some number increment system like when page views != 1 do not show? I think that is the route to take but I am not quite sure how I would write that out.

As I said in the beginning, Im a learning coder with very limited knowledge. Im not asking anyone to write this out for me, as that would be counterproductive to actually learning, but rather to explain to me the concept of how I would do this, because I am pretty lost.

 

Thanks in advance for the help - the n00b

Link to comment
Share on other sites

You could have a flag that is like 0 = Not read and 1 = Read

 

So when they log in, you would look for all items that are 0 = Not Read and then when they view them you change it to 1 for being read.

 

Psuedo Example (if you're using a database of sorts like MySQL)

 

Johnny logs in and see 4 new items (SELECT * FROM meh WHERE read = 0) Results = 4 items unread

 

Johnny views each item individually and it is marked as being seen/read (UPDATE meh SET read = 1 WHERE id = 'some_id') some_id = unique identifier of each row item in the table for the events he looks at.

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.