我有 4 个表如下,;
tbl_UserInfo DUMMY VALUES DATATYPE
UserID 1 Integer (PRIMARY KEY)
UserName A Text
FacebookID 10021556 Text
EmailID ABC@gmail.com Text
Facebook_EmailID asdf@asfd.com Text
Password welcome123 Text
Chips 100 Integer
DeviceType iphone Text
tbl_Game DUMMY VALUES DATA TYPE
GameID 1 Integer
Type H or M Text
Complete No Text
tbl_GamePlayer DUMMY VALUES DATA TYPE
ID 1 Integer (PRIMARY KEY)
GameID 1 Integer (FOREIGN KEY FOR GameID in tbl_Game)
userid 1 Integer (FOREIGN KEY FOR UserID in tbl_UserInfo)
tbl_Streaks DUMMY VALUES DATA TYPE
ID 1 Integer
GameID 1 Integer (FOREIGN KEY FOR GameID in tbl_Game)
Player1 1 Integer (FOREIGN KEY FOR UserID in tbl_UserInfo)
Player2 2 Integer (FOREIGN KEY FOR UserID in tbl_UserInfo)
Streaks 2 Integer
我想要reslut作为
{
Player1 = "A"
Player2 = 'B"
Streaks = 10 (between Player1 and Player2)
Chips = 100 (for player1)
Chips = 200 (for player2)
Fbid= 124578 (for player1)
Fbid = 784512 (for player2)
}
{
Player1 = "A"
Player3 = 'C"
Streaks = 15 (between Player1 and Player3)
Chips = 100 (for player1)
Chips = 450 (for player3)
Fbid= 5654578 (for player1)
Fbid = 7845512 (for player3)
}
{
Player1 = "A"
Player4 = 'D"
Streaks = 5(between Player1 and Player4)
Chips = 100 (for player1)
Chips = 208 (for player4)
Fbid= 12898978 (for player1)
Fbid = 78488512 (for player4)
}
我想显示已登录用户的所有现有游戏(以及他其他玩家的 fbid、用户名、筹码、条纹),完整 = '否'
注意 -userid
作为参数传递,所有玩家都通过他们的用户 ID 连接