I Made two tables
- posts
- categories
In posts table I created category column, here I store multiple category_id like this 1,2,3.
The problem is if category column has single category_id like 1 or 2 or 3, I can easily query the data like this:
SELECT title FROM posts WHERE category = $category_id
However, I am unsure as to how to query the comma-delimited data. Is there a way to do this, or should I change the table structure ?

posts_categorieswith post_id and category_id.