473,569 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's the logic behind Youtube "Subscribe" feature and how to make same system?

ilya Kraft
134 New Member
Hello,

I would like to know how to make similar system to youtube subscriptions. I'm working on a website where members post articles (like videos on youtube) an I want to have a subscribe feature. So if user subscribes to another he gets all the latest articles etc.

Can anyone explain logic behind it? And perhaps suggest any ideas on how to start it )))

Thank You
May 27 '11 #1
2 1824
dlite922
1,584 Recognized Expert Top Contributor
This project obviously has a database, so create a table called subscription with user ID's in it.

two columns:
first column is the user ID of the source user
second column is the user ID of those subscribed

UNIQUE(col1,col 2) in that order.

So every time a user clicks subscribe you put the user ID of the author of the article in the first column and user ID of the user that clicked subscribe in the second column.

Sample data (i'll use names instead of IDs):
Expand|Select|Wrap|Line Numbers
  1.  
  2. author    | subscriber
  3. -----------------------
  4. john      | kim
  5. john      | darrel
  6. kim       | jim
  7. kim       | john
  8.  
  9.  
  10.  
When a user adds an article, you basically get all the user's that are subscribed and notify them (email, alert, etc)

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT subscriber 
  3. FROM subscription 
  4. WHERE author = '$authorUserID'; 
  5.  
  6.  
Hope that helped,


Dan
May 31 '11 #2
ilya Kraft
134 New Member
Alright thank you very much mate ))) I think I can handle it from here just needed to understand it )))
Jun 1 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4235
by: Muaz Farooq | last post by:
hi every one, can anybody tell me how can i make system independent exe. file of my project which can run on any computer even those which don't have .Net installed on them
1
2603
by: Fei Li | last post by:
Hi, Whi can help to expain what logic is when I cast enum a to b? Thanks
2
1708
by: TomHL | last post by:
Hello all, I need to do an application that takes a Bitmap object and convert it to one of the color tables below: 1. 16 colors. 2. 256 colors. 3. 24bpp. I read about lockbits and unsafe code, but how can I change the actual value
3
1073
by: trebor | last post by:
How does the interaction of forms in functions like FindText work? I'm talking only about the interaction of the forms and how they exchange data. For example, when you search for text, the search form obviously must access the text in the editing form, but I'm not having any luck doing that. I've done a few multiple-form projects, where...
1
1431
by: Paris | last post by:
Hi, As part of one of the units for my degree (studying away from the uni for the moment due to family problems), I have been designing a database for a high school back in London. The database is well, sort of meant to be a Teachers Diary. - A friend of mine has kindly uploaded my database to the following places: Mirror 1 (YouSendIt):...
7
1541
by: sanctus | last post by:
thanks to some people here I know now that if I have a class CmbCalc then the following code CmbCalc::CmbCalc() :infla(true) will initialize infla to be true. This class is defined in a header file what it implies it is a global class for all .cc files which include this header file, right? Now the question is when will the constructor be...
4
1994
by: ravi | last post by:
Hello, the code below calculate the number of bits set in an unsigned integer. Can you explain me the logic behind the code? unsigned int x = Some number; x=(0xaaaaaaaa&x)>>1+(0x55555555&x); x=(0xcccccccc&x)>>2+(0x33333333&x); x=(0xf0f0f0f0&x)>>4+(0x0f0f0f0f&x);
5
2106
by: lsllcm | last post by:
Hi All, I have one question about many "or" operation make system choose incorrect index There is one table TT ( C1 VARCHAR(15) NOT NULL, C2 VARCHAR(15) NOT NULL, C3 VARCHAR(15) NOT NULL, C4 VARCHAR(15) NOT NULL
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.