SELECT * FROM [bloxview] WHERE (([User Id] = @User_Id) AND ([permissions] = @permissions)
@User_Id is an url querystring (?id=), and @permissions is the value '1'
But i also want to add to this select:
OR (regarding to the permissions)
WHERE [permission] = a number which matches the 'permissions' called Expr3 on the view) column value of a different table, but only rows where this tables 'userid' column = the urlquerystring id and the 'theiruserid' column matches the Profile.UserName signed in..
Am i best off using a view for this? or can i access and compare two tables at once?
Can someone help me put the above into proper code?
View Complete Post