I'm trying to build a database for a project of mine, and the user will be able to enter multiple parameters. I then need to find all database entries, where no other parameters exist in that column.
I have one column, where all these parameters are listed, seperated by ,
(car, truck, 4wd
). I now need to find all entries, where there are no other parameters than the ones in the search. It doesn't need to be all of them, but no others.
Example: Parameters: car, truck
Entries:
car, truck -> valid
car, 4wd, truck, -> invalid
car -> valid
I am trying to do this more or less while the user types, so I would love it if I then didn't have to find the database entries and then use my php to file through all the invalid entries, but could somehow do it directly in my query.