Hiding records from one user but not for another
Set up a website that allows a management user to add/edit/delete notices for staff users to read.
Upon reading, staff users can select "Mark as seen" and the idea is that it hides for them, but not for other users - however, the query I'm using doesn't seem to be working properly in that if I had notice1, notice2 and notice3 once "user1" hides "notice1", no notices appear for "user1".
Obviously I believe this to be in the 2nd half of the query, however,can't figure out how to limit to where user & id(noticeseen) = user(logged in) & id(notices)
SELECT * FROM notices WHERE staffCat<='".$_SESSION['UserAccess']."' AND NOT EXISTS (SELECT * FROM noticeseen WHERE user='".$_SESSION['UserName']."')";
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread