Welcome Guest, Not a member yet? Register   Sign In
Remove values in comma separated list from database
#2

Comma separated values, serialization, json, or any other stringified type of object is not ideal to store in a database. Search around for "database normalization", and learn the right way to create databases/tables.

The only thing you can do here is use LIKE, but as you are aware that isn't ideal because 4 would match 40, 404, 84, etc.

You could select all rows, then let PHP handle it, and that's really not ideal.

So, consider database normalization, because it's the right thing to do for data integrity.
Reply


Messages In This Thread
RE: Remove values in comma separated list from database - by skunkbad - 05-24-2017, 11:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB