I have a question when giving a select, because I have 3 tables, they are professionals, experiences, address.
Let's say I have a professional and this professional has more than 2 experiences. Is there any way to bring this information in a line, if not how can I do it in php, so that the name of the professional is not repeated.
Tables:
Professional:
id
name
surname
civil_status
Experiences:
id
charge
dt_entry
dt_said
professional_id
My select for now is like this
SELECT pro.id, pro.nome, exp.cargo
FROM Profissional pro
INNER JOIN experiencias exp ON exp.id_profissional = pro.id
WHERE pro.id = :algumacoisa GROUP BY pro.id
Example output
We have 1 registered professional with 2 positions.
ID Nome Cargo Cargo
1 romario programador Técnico
More or less, I know that the table name does not repeat itself, but if you have a solution, thank you.