如何将朋友添加到数据库中的特定用户? [英] How to add friends to a specific user in a database?

查看:66
本文介绍了如何将朋友添加到数据库中的特定用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我提供了一个脚本,该脚本可以使人们注册并登录,但我需要一个脚本,以便他们可以将朋友添加到他们的帐户中,例如facebook或myspace.请帮助!谢谢.

Hello, i have come with a script that allows people to sign up and login in but i need a script so they can add friends to their account kinda like facebook or myspace please help! thanks.

推荐答案

什么脚本?

您需要先进行数据库设置,然后再进行UI设置,以便将该数据输入到系统中.

将有一个包含两个好友链接的交易表(例如saya TrnFriends).

示例:
MstUsers
PK名称
1个ABC
2 XYZ
3 UVW

TrnFriends
PK FK1 FK2
1 1 2 => ABC和XYZ是朋友
2 1 3 => ABC和UVW是朋友
3 2 3 => XYZ和UVW是朋友

立即尝试!
What script?

You need to have database setup and then the UI in order to feed in that data into the system.

There would be a Transaction table(lets saya TrnFriends) that would contain links of two Friends.

Example:
MstUsers
PK Name
1 ABC
2 XYZ
3 UVW

TrnFriends
PK FK1 FK2
1 1 2 => ABC & XYZ are friends
2 1 3 => ABC & UVW are friends
3 2 3 => XYZ & UVW are friends

Try now!


这篇关于如何将朋友添加到数据库中的特定用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆