I'm storing multiple numbers in a MySQL cell by using a delimiter (eg "1,5,10") and the TEXT datatype.
How do I perform lookups like this?
SELECT * FROM MyTable WHERE MultiVals CONTAINS "5"
And lastly, is this the preferred approach to store such values? I'm using this like a linker table, to link certain rows to multiple other rows in another table (via IDs). Since I'm trying to minimize the filesize of the DB, I thought this would be a more compact approach to linking instead of using another table like this:
Person ID Product ID
----------- -----------
3 1
3 2
3 3
7 5
7 7