473,503 Members | 1,888 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 1819
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,col2) 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
4234
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
2598
by: Fei Li | last post by:
Hi, Whi can help to expain what logic is when I cast enum a to b? Thanks
2
1706
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...
3
1072
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...
1
1418
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...
7
1537
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...
4
1985
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);...
5
2102
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,...
0
7348
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...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5021
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...
0
4685
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...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
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 ...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.