If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Probably the "best" solution is to normalize the data, so that if you want to treat "Birth Defects|Pregnancy and Reproduction" as two different subjects, then they should be in the database as separate rows. You might implement that without changing the current data by (though that would reduce the amount of normalization) by breaking out all the subjects into a separate table.

Then you can use a join on that subject_to_topic table to get your grouping criteria. It should be relatively simple to create either a Db query or a PHP script to populate the new relational table from the main topics table, by explode()-ing the subjects from the original topic table and inserting rows in the new table for each explode()-ed part.