Skip to content
Advertisement

SQL – Selecting from a multiples values field

I’m using Teampass, here is a minimised example of the tables schema

Teampass_Roles_Title :

and Teampass_Users

the numbers in fonction_id are the ids from the table Teampass_Roles_Title Instead of using an intermediate table, they opted for this model, and I dont know if there is any way to have for example a liste of all users that access to Title 6

Advertisement

Answer

This is a really bad data model. Sometimes, we are stuck with other people’s really, really bad decisions. You can do what you want using find_in_set() and replace():

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement