Click here to Skip to main content
15,904,655 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have one table for items which contain itemid,itemname , another for permission which contain userid,itemid. Now i want to show the user only those products whose permission given to him in the userpermission. Its on the userlogin and userid is stored in Session .
Posted

1 solution

I assume you need the sql part

SQL
SELECT
    *
FROM 
    Item_Table it
JOIN
    Permission_Table pt
ON
    it.itemid = pt.itemid
WHERE
    pt.userid = @userId
 
Share this answer
 
Comments
Amir Mahfoozi 29-Oct-11 7:35am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900