php - Join two mysql tables -
i have 2 databases - 1 articles , articles' meta information (like author, date, category , atc.). have following columns in meta table: id, article id, meta type , meta value. wonder how can join these 2 tables both - article , meta information - 1 mysql query. article id isn't unique in meta table, why can't figure out how access specific meta type , according value article.
select * article_table right join meta_table on article_table.article_id = meta_table.article_id;
you repeats article table, gets meta data in single query. believe otherwise need use multiple.
Comments
Post a Comment