Dipa Ahuja

Dipa Ahuja

  • NA
  • 3.1k
  • 714.4k

query from two tables

Mar 3 2010 8:23 AM
hi i want to get data like friendAddRequests that are shown on our home page when we sign in any social networking website like orkut. 

fields are 

table:profile

1.profile_Id
2.pimage

table:friends

1.friendid
2.myid

from friend table i want to get friendid like (select friendid,myid from friends where myid=profile.myid)

where profile.myid is profile field of web.config file


n this data i want to load in gridview 
bt after getting "friendid" from friends i want to get profile_image of friendid from "profile"  table where friendid(in profile table is profile_Id)..

untitled.bmp



Answers (3)