I have a database that contains two tables:
The entries table contains posts that each have one or more tags. The problem
You need a mapping table.
Create a table called entries_tags that contains two columns: entry_id and tag_id, with a multi-key on both entries.
entries_tags
entry_id
tag_id
This is called a many-to-many relationship.