I have a table with a field for the name and a Merchant field with the services they provide. The Services field is a comma-separated list of integers that refer to another Services table, with the identifiers Service and Service Name.
I am trying to create a single query that combines the two, so I can have a list of Merchants along with the service names. My solution so far has been to make a second loop in my original foreach loop, but that could mean 5 or 6 db calls for each Merchant name.
After some StackOverflow-ing (google-ing), I noticed that using a comma-delimited field is probably not the best way.
Anyone have a way to make a connection or thoughts on how the db structure could be tuned? Thank you very much in advance!
source
share