Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 25, 2012 11:58 AM by Afzaal.Ahmad.Zeeshan
Nov 25, 2012 07:18 AM|LINK
SELECT * FROM Status_Post INNER JOIN Frend_List ON Status_Post.UserId = Frend_List.New_Id WHERE Frend_List.List_Of =27 OR Status_Post.UserId =27
This is a clause I am trying to reach data with. But this gives me exact data only for the Frend_List.List_Of while looking for Status_Post.UserId =27 It gives back every data multiply by 2.
Like If there is a value for it it will send it twice. Any error in this clause?
Nov 25, 2012 09:25 AM|LINK
Make sure, you have one to one relationship(UserId and New_Id) in Frend_List and Status_Post.
if you are getting duplicate records, you can use Distinct in select statement.
Nov 25, 2012 11:58 AM|LINK
Yes they are same in the database tables.
Also the Frend_List.List_Of and Status_Post.UserId are same. But I am trying to get two different types of data.
One while joining the frend_list and other by just getting the value of currentUser.