Hello 🙂
I'm currently writing a show system for a radio station website that will link into the CMS to allow members of each show's team to update their page.
Each user has an ID ($userid), and each show entry in the db has a field called 'access' where the user ID's of those who can edit are kept, seperated by commas. So if for example users 10, 34, and 60 are allowed to edit the Breakfast Show, then the access field's value for the breakfast show would be '10, 34, 60'. But user 34 might also be on the team for the drivetime show with users 22 and 98, so the drivetime show would have a value of '22, 34, 98'.
Basically, I need a query to display which shows a user is allowed to edit. So assuming I am userid number 34 and I load up the show listings page, I need to it to look through all the shows and return any that include 34 somewhere in their access field - but obviously it needs to be exact, ONLY 34 not 134, 340 and so on, so using a basic LIKE with wildcards doesn't work - in this case it would end up showing me Breakfast and Drivetime.
Most things I can pick up and maybe get a little bit into it before hitting a brick wall, with this I don't even know where to start!. Any help is much appreciated.
Cheers.
EDIT: Just noticed that this is probably better off the in the database section, if someone is able to move it for me?