In my database, I have 2 tables of interest, users and content.
"Users" has a field called "subscriptions" which holds a list if id's that correspond to articles in "content". That is: users.subscriptions is a list that you would find in content.id
The items in users.subscriptions are seperated by : for easy implode/explode operations.
Here's my question:
I want to pull all of the information out of "content", where the list of id's in users.subscriptions matches content.id. I figured out how to do this by exploding the list, and doing a foreach for the array, and sending a query for each part of the array.
However, I would like to be able to do this without sending 20-50 queries everytime the page loads. Is there a way to create a query, and match the array data vs. the content.id's in just one query?
Thanks for your help.