I need to make a query using 3 tables and i having some trouble with that.
I have 3 tables in my project:
projects
, projects_categories
and categories
projects
projects_categories
- id_proj_cat
- id_project
- id_category
categories
I already made a join query but the result is a array with the same project_id showing several times.
What i need is a more efficient query that can list for each project_id a array inside, with it′s categories and names. Something like that.
I can make a separate query but im trying to achieve that in one single query.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…