Click here to Skip to main content
15,885,862 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello

i am devloping a website in it I want to do when new user register he can add update delete contact information to only his profile.

like in gmail when new user create Sign up he can add update delete his friends email id information like that.

so what should do??

thanxx

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 16-Feb-13 21:58pm
v2
Comments
OriginalGriff 17-Feb-13 3:58am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Member 9784436 17-Feb-13 7:41am    
thanx sir for telling about "capitals is considered shouting on the internet"
OriginalGriff 17-Feb-13 7:44am    
You're welcome - it is general Netiquette, not specific to this site. Ignore it at your peril! :laugh:
http://en.wikipedia.org/wiki/Etiquette_(technology)
OriginalGriff 17-Feb-13 3:59am    
What have you tried?
Where are you stuck?
Member 9784436 17-Feb-13 7:24am    
that means sir when new user sine up, c# create automatically database for that particular user.

1 solution

"that means sir when new user sine up, c# create automatically database for that particular user."

That is a spectacularly bad idea! :laugh:
Creating a database or even a table for each user is a massive waste of space, memory, and time.

If you want a list of "contacts" which is specific to each user then create a table which holds cross references:
User Table:
ID      Name     Email
1       Joe      Joe@Domain.com
2       Mike     Mike@OtherDomain.com
...
1000    Fred     FredTheShred@RBS.com


Contacts table:
ID      UserID   ContactID
1       1        2
2       1        1000
3       1        777
4       2        1000
5       2        666
In this example, User 1 (Joe) knows user 2 (Mike), another user with the id 777 and user 1000 (Fred).
User 2 (Mike) knows Fred, and another user with the ID 666)
To find out which contacts a user has, you select the records from the Contacts table, asking only for those records with his User ID:
SQL
SELECT ContactID FROM Contacts WHERE UserID=1
 
Share this answer
 
Comments
Member 9784436 17-Feb-13 9:13am    
thanx a lot sir i got whole concept.
OriginalGriff 17-Feb-13 9:34am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900