Hi,
I'm trying to compare one mysql field in one table to another field in another table, as so:
SELECT cl.* FROM classes_table cl, characters_table c
WHERE c.character_type IN (cl.class_types)
...
Now the "c.character_type" field is a single numeric entry (eg. 10) but the "cl.class_types" will be, potentially, numerous. eg. "10-15-3-1". I need to be able to check if the first value of "10" is within the second field.
Now outside of mysql I know you would just explode the second field and then could use "in_array" for comparison (which would be perfect).
So my question is, what it the best way of doing the same thing within MySQL? (it has to be within the query).
Many thanks in advance! 🙂