I have two databases – one for articles and the another for the articles’ meta information (Like author, date, category and atc.). I have the following columns in meta table: ID, article id, meta type and meta value. I wonder how can I join these two tables to get both – article and meta information – with one mysql query. The article id isn’t unique in meta table, that is why I can’t figure out how to access specific meta type and according value for the article.
Share
SELECT *FROM article_table
RIGHT JOIN meta_table
ON article_table.article_id = meta_table.article_id;
You get repeats from the article table, but it gets all the meta data in a single query. I believe otherwise you need to use multiple.