任何人都可以写这个问题的选择查询? [英] Can anybody write the select query for this issue?

查看:108
本文介绍了任何人都可以写这个问题的选择查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我havetwo表即mit_follow&安培; mit_tweets

I havetwo Tables namely mit_follow & mit_tweets

在mit_follow表结构:

Id    UserName            followers          Following

1     dobriyalji          manish             Sachin
2     dobriyalji          karthik            parul

在mit_tweets表结构:

Id        UserName          tweets

1         dobriyalji        hi everybody
2         manish            hello all m karthik

我想写SELECT查询该..

i wanna write the select query for this ..

如果我在登录表mit_tweets使用用户名dobriyalji ....及后鸣叫然后dobriyalji和所有他的追随者可以查看他们的留言并所有的追随者封邮件将被dobriyalji ...即时显示使用GridView中mit_tweets表中查看在网络表单......

if i login using username dobriyalji .... and post tweets in mit_tweets table then dobriyalji and all of his followers can view their msgs and all the followers msgs will be viewed by dobriyalji...i m displaying the mit_tweets table using gridview in webform....

和是否有新会员登录到自己的帐户和后鸣叫然后GridView中只有新成员味精会显示...

and if any new member login to their account and post tweets then in gridview only new member msg will display ...

任何机构可以写SELECT查询此?

can any body write the select query for this ?

推荐答案

我不知道你的mit_follow表。你的追随者和下面的列并不真正意义。当然,这个表应该看起来更像是:

I'm not sure about your mit_follow table. Your followers and Following columns don't really make sense. Surely the table should look more like:

id user            user_followed
** *************** ******************
1  dobriyalji      Sachin
2  dobriyalji      parul
3  manish          dobriyalji      
4  karthik         dobriyalji

这会更容易查询

这篇关于任何人都可以写这个问题的选择查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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