3
Answers

query from two tables

Dipa Ahuja

Dipa Ahuja

15y
2.9k
1
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)